summaryrefslogtreecommitdiffhomepage
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/mingw-w64.cmake17
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)