summaryrefslogtreecommitdiffhomepage
path: root/cmake
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-07-03 13:39:09 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-07-03 13:39:09 +0200
commit41f9ea3045f21f1d1cea74b3b551c26ce57f2fd0 (patch)
treed264ef32ee1fff8dad5e9bdad258692d16aa39b3 /cmake
parent0d8d1093d2277b3092c51c11b69257863aee45cb (diff)
cmake/mingw-w64: change WARNINGS_ENABLE logic
It makes sense to default for opentrack only. Depends can be messy and they will.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/mingw-w64.cmake9
1 files changed, 7 insertions, 2 deletions
diff --git a/cmake/mingw-w64.cmake b/cmake/mingw-w64.cmake
index b11a24c6..b97408b0 100644
--- a/cmake/mingw-w64.cmake
+++ b/cmake/mingw-w64.cmake
@@ -52,7 +52,12 @@ set(_LDFLAGS "-Wl,--as-needed")
set(_LDFLAGS_RELEASE "")
set(_LDFLAGS_DEBUG "")
-set(WARNINGS_ENABLE TRUE CACHE BOOL "Emit additional warnings at compile-time")
+set(enable-val FALSE)
+if(CMAKE_PROJECT_NAME STREQUAL "opentrack")
+ set(enable-val TRUE)
+endif()
+
+set(WARNINGS_ENABLE ${enable-val} CACHE BOOL "Emit additional warnings at compile-time")
# these are very noisy, high false positive rate. only for development.
set(WARNINGS_FINAL_SUGGESTIONS FALSE CACHE BOOL "Emit very noisy warnings at compile-time")
set(WARNINGS_NUMERIC FALSE CACHE BOOL "Emit very noisy warnings at compile-time")
@@ -62,7 +67,7 @@ set(noisy-warns "")
set(suggest-final "")
set(numerics "")
set(missing-override "")
-if(CMAKE_PROJECT_NAME STREQUAL "opentrack" AND WARNINGS_ENABLE)
+if(WARNINGS_ENABLE)
if(WARNINGS_FINAL_SUGGESTIONS)
set(suggest-final "-Wsuggest-final-types -Wsuggest-final-methods")
endif()