File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,23 +82,23 @@ function(enable_warnings target)
8282 if (NOT WIN32 )
8383 # Lot's of false-positives on windows.
8484 # E.g. __builtin_ia32_crc32qi on MinGW and SDL
85- check_and_add_warnings (TARGET ${target} VISIBILITY ${visibility}
86- CXX -Wredundant-decls
87- )
85+ check_and_add_warnings (TARGET ${target} VISIBILITY ${visibility} CXX -Wredundant-decls )
8886 endif ()
8987 # Prior to 9.2 "final" was not considered "override"
9088 if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9.2)
9189 target_compile_options (${target} ${visibility} $<$<COMPILE_LANGUAGE :CXX >:-Wsuggest -override -Wno -error =suggest -override >)
9290 endif ()
9391 if (NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
9492 # Lot's of false-positives on for e.g. strcmp
95- check_and_add_warnings (TARGET ${target} VISIBILITY ${visibility}
96- CXX -Wunreachable-code
97- )
93+ check_and_add_warnings (TARGET ${target} VISIBILITY ${visibility} CXX -Wunreachable-code )
9894 elseif (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6" OR CMAKE_CXX_COMPILER_ID MATCHES "AppleClang" )
9995 # Wrong warnings for std::array until clang 6
10096 target_compile_options (${target} ${visibility} -Wno-missing-braces )
10197 endif ()
98+ if (CMAKE_CXX_COMPILER_ID MATCHES "AppleClang" OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.0))
99+ # To many false positives until clang 10 fixed them
100+ check_and_add_warnings (TARGET ${target} VISIBILITY ${visibility} CXX -Wno-range-loop-analysis )
101+ endif ()
102102 # Not used:
103103 #-Wpadded
104104 #-Wstack-protector
You can’t perform that action at this time.
0 commit comments