[CMAKE] Some options are only supported by GCC, don't use them for clang

These are (so far):
-Wno-format-overflow
-Wno-nonnull-compare
-Wno-old-style-declaration
-Wno-unused-but-set-variable
This commit is contained in:
Victor Perevertkin 2021-04-09 03:58:19 +03:00
parent 959729f6ee
commit 74ec94e12c
35 changed files with 99 additions and 57 deletions

View file

@ -121,14 +121,18 @@ target_link_libraries(glu32 cpprt)
set_module_type(glu32 win32dll)
if(NOT MSVC)
target_compile_options(glu32 PRIVATE -Wno-write-strings -Wno-unused-but-set-variable)
# Prevent a warning when comparing 'this' against 0
set_source_files_properties(src/libnurbs/internals/arc.cc PROPERTIES COMPILE_FLAGS "-Wno-nonnull-compare")
target_compile_options(glu32 PRIVATE -Wno-write-strings)
elseif(USE_CLANG_CL)
target_compile_options(glu32 PRIVATE -Wno-self-assign -Wno-unused-function -Wno-microsoft-include)
target_compile_options(glu32 PRIVATE -Wno-deprecated-register -Wno-tautological-undefined-compare)
endif()
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
target_compile_options(glu32 PRIVATE -Wno-unused-but-set-variable)
# Prevent a warning when comparing 'this' against 0
set_source_files_properties(src/libnurbs/internals/arc.cc PROPERTIES COMPILE_FLAGS "-Wno-nonnull-compare")
endif()
add_importlibs(glu32 opengl32 gdi32 msvcrt kernel32 ntdll)
add_pch(glu32 precomp.h "${PCH_SKIP_SOURCE}")
add_cd_file(TARGET glu32 DESTINATION reactos/system32 FOR all)