@@ -37,7 +37,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
3737 add_compile_options (-Woverloaded-virtual) # when a function declaration hides virtual functions from a base class
3838
3939 add_compile_options (-Wsuggest-attribute=noreturn)
40- add_compile_options_safe(-Wuseless-cast)
40+ # add_compile_options_safe(-Wuseless-cast) # triggered by _WIN32 code
4141elseif (CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
4242 add_compile_definitions (_CRT_SECURE_NO_WARNINGS)
4343 # TODO: bump warning level
@@ -51,15 +51,20 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
5151 # these are not really fixable
5252 add_compile_options (-Wno-exit-time-destructors -Wno-global -constructors -Wno-weak-vtables)
5353 add_compile_options_safe(-Wno-unsafe-buffer-usage)
54+ add_compile_options_safe(-Wno-nrvo)
5455 # we are not interested in these
5556 add_compile_options (-Wno-multichar -Wno-four-char-constants)
5657 # ignore C++11-specific warning
5758 add_compile_options (-Wno-suggest-override -Wno-suggest-destructor-override)
5859 # contradicts -Wcovered-switch-default
5960 add_compile_options (-Wno-switch-default)
61+ # for _WIN32
62+ add_compile_options (-Wno-reserved-macro-identifier)
63+ add_compile_options (-Wno-unused-macros )
6064 # TODO: fix these?
6165 add_compile_options (-Wno-padded -Wno-sign-conversion -Wno-implicit-int-conversion -Wno-shorten-64-to-32 -Wno-shadow-field-in-constructor)
6266
67+
6368 if (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 14 OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 14)
6469 # TODO: verify this regression still exists in clang-15
6570 if (CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" )
0 commit comments