diff options
Diffstat (limited to 'cmake/mingw-w64.cmake')
-rw-r--r-- | cmake/mingw-w64.cmake | 9 |
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() |