aboutsummaryrefslogtreecommitdiff
path: root/backend/ninja
diff options
context:
space:
mode:
Diffstat (limited to 'backend/ninja')
-rw-r--r--backend/ninja/Ninja.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp
index e05b7b9..69b480e 100644
--- a/backend/ninja/Ninja.cpp
+++ b/backend/ninja/Ninja.cpp
@@ -1013,6 +1013,11 @@ namespace backend
compileCCommand.push_back(ninja::NinjaArg("-w"));
}
+ if(config.errorOnWarning)
+ {
+ compileCCommand.push_back(ninja::NinjaArg("-Werror"));
+ }
+
vector<ninja::NinjaArg> optimizationFlags = getCompilerOptimizationFlags(config);
compileCCommand.insert(compileCCommand.end(), optimizationFlags.begin(), optimizationFlags.end());
@@ -1049,6 +1054,9 @@ namespace backend
else
compileCCommand.push_back(ninja::NinjaArg("/w"));
+ if(config.errorOnWarning)
+ compileCCommand.push_back(ninja::NinjaArg("/WX"));
+
// TODO: Remove this once locate_windows_sdk has been updated to locate multiple arch windows sdk
#if OS_TYPE == OS_TYPE_WINDOWS && defined(SIBS_ENV_32BIT)
#error "sibs is currently not supported on windows 32-bit because locate_windows_sdk can only locate x64 windows sdk"