Skip to content

Commit 4cbf3d3

Browse files
firewaveglankk
andcommitted
disabled some compiler warnings
Co-authored-by: glankk <[email protected]>
1 parent 8a49a73 commit 4cbf3d3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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
4141
elseif (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
4242
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
4343
# TODO: bump warning level
@@ -57,9 +57,13 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
5757
add_compile_options(-Wno-suggest-override -Wno-suggest-destructor-override)
5858
# contradicts -Wcovered-switch-default
5959
add_compile_options(-Wno-switch-default)
60+
# for _WIN32
61+
add_compile_options(-Wno-reserved-macro-identifier)
62+
add_compile_options(-Wno-unused-macros)
6063
# TODO: fix these?
6164
add_compile_options(-Wno-padded -Wno-sign-conversion -Wno-implicit-int-conversion -Wno-shorten-64-to-32 -Wno-shadow-field-in-constructor)
6265

66+
6367
if (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 14 OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 14)
6468
# TODO: verify this regression still exists in clang-15
6569
if (CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")

0 commit comments

Comments
 (0)