@@ -21,23 +21,23 @@ endfunction()
2121
2222if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" )
2323 add_compile_options (-pedantic )
24+
2425 add_compile_options (-Wall )
2526 add_compile_options (-Wextra )
2627 add_compile_options (-Wcast-qual ) # Cast for removing type qualifiers
2728 add_compile_options (-Wfloat-equal ) # Floating values used in equality comparisons
2829 add_compile_options (-Wmissing-declarations ) # If a global function is defined without a previous declaration
2930 add_compile_options (-Wmissing-format-attribute ) #
30- add_compile_options (-Wno-long-long )
3131 add_compile_options (-Wpacked ) #
3232 add_compile_options (-Wredundant-decls ) # if anything is declared more than once in the same scope
3333 add_compile_options (-Wundef )
34- add_compile_options (-Wno-missing-braces )
35- add_compile_options (-Wno-sign-compare )
36- add_compile_options (-Wno-multichar )
3734 add_compile_options (-Woverloaded-virtual ) # when a function declaration hides virtual functions from a base class
3835
3936 add_compile_options (-Wsuggest-attribute=noreturn )
4037 add_compile_options_safe (-Wuseless-cast )
38+
39+ # we are not interested in these
40+ set_source_files_properties (test .cpp PROPERTIES COMPILE_FLAGS -Wno-multichar )
4141elseif (CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
4242 add_compile_definitions (_CRT_SECURE_NO_WARNINGS )
4343 # TODO: bump warning level
@@ -46,26 +46,31 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
4646 add_compile_options (/wd4267 ) # warning C4267: '...': conversion from 'size_t' to 'unsigned int', possible loss of data
4747elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
4848 add_compile_options (-Weverything )
49+
4950 # no need for c++98 compatibility
5051 add_compile_options (-Wno-c++98-compat-pedantic )
51- # these are not really fixable
52+
53+ # these are not really fixable until newer standards
5254 add_compile_options (-Wno-exit-time-destructors )
5355 add_compile_options (-Wno-global-constructors )
5456 add_compile_options (-Wno-weak-vtables )
5557 add_compile_options_safe (-Wno-unsafe-buffer-usage )
5658 add_compile_options_safe (-Wno-nrvo )
57- # we are not interested in these
58- add_compile_options (-Wno-multichar )
59- add_compile_options (-Wno-four-char-constants )
59+
6060 # contradicts -Wcovered-switch-default
6161 add_compile_options (-Wno-switch-default )
62+
6263 # TODO: fix these?
6364 add_compile_options (-Wno-padded )
6465 add_compile_options (-Wno-sign-conversion )
6566 add_compile_options (-Wno-implicit-int-conversion )
6667 add_compile_options (-Wno-shorten-64-to-32 )
6768 add_compile_options (-Wno-shadow-field-in-constructor )
6869
70+ # we are not interested in these
71+ set_source_files_properties (test .cpp PROPERTIES COMPILE_FLAGS -Wno-multichar )
72+ set_source_files_properties (test .cpp PROPERTIES COMPILE_FLAGS -Wno-four-char-constants )
73+
6974 if (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 14 OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 14)
7075 # TODO: verify this regression still exists in clang-15
7176 if (CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" )
0 commit comments