diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-06-10 07:11:36 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-06-10 07:11:48 +0200 |
commit | 259d6a6a6849c171b689a6ec1ada70c017a4f1ff (patch) | |
tree | 5ee63674c0c800783587ff2813bcca93ae67be69 | |
parent | 77075f6ba554a9c40b7e364e16d25e87c8bfca43 (diff) |
cmake: move warnings around in mingw-w64 toolchain file
-rw-r--r-- | cmake/mingw-w64.cmake | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/cmake/mingw-w64.cmake b/cmake/mingw-w64.cmake index a7add16d..4b5c2aa5 100644 --- a/cmake/mingw-w64.cmake +++ b/cmake/mingw-w64.cmake @@ -48,24 +48,24 @@ set(_LDFLAGS_DEBUG " ${_CXXFLAGS_DEBUG} ") set(WARNINGS_ENABLE TRUE 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_PEDANTIC FALSE CACHE BOOL "Emit very noisy warnings at compile-time") set(WARNINGS_NUMERIC FALSE CACHE BOOL "Emit very noisy warnings at compile-time") +set(WARNINGS_MISSING_OVERRIDE FALSE CACHE BOOL "Emit very noisy warnings at compile-time") set(noisy-warns "") set(suggest-final "") -set(pedantics "") set(numerics "") +set(missing-override "") if(CMAKE_PROJECT_NAME STREQUAL "opentrack" AND WARNINGS_ENABLE) if(WARNINGS_FINAL_SUGGESTIONS) set(suggest-final "-Wsuggest-final-types -Wsuggest-final-methods") endif() - if(WARNINGS_PEDANTIC) - set(pedantics "-Wuseless-cast -Wsuggest-override") - endif() if(WARNINGS_NUMERIC) - set(numerics "-Wdouble-promotion") + set(numerics "-Wdouble-promotion -Wsign-compare") + endif() + if(WARNINGS_MISSING_OVERRIDE) + set(missing-override "-Wsuggest-override") endif() - set(noisy-warns "${suggest-final} ${pedantics} ${numerics}") + set(noisy-warns "${suggest-final} ${numerics}") endif() # -Wodr and -Wattributes are disabled due to LTO false positives in dependencies. @@ -75,7 +75,8 @@ if(CMAKE_COMPILER_IS_CLANG) endif() set(_CXX_WARNS "") if(WARNINGS_ENABLE) - set(_CXX_WARNS "-Wall -Wextra -pedantic -Wdelete-non-virtual-dtor -Wsign-compare -Wno-odr -Wno-attributes -Wcast-align -Wc++14-compat ${clang-warns} ${noisy-warns}") + set(usual-warns "-Wall -Wextra -pedantic -Wdelete-non-virtual-dtor -Wno-suggest-override -Wno-odr -Wno-attributes -Wcast-align -Wc++14-compat") + set(_CXX_WARNS "${usual-warns} ${clang-warns} ${noisy-warns} ${missing-override}") endif() foreach(j C CXX) |