[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

@ -53,8 +53,11 @@ add_importlibs(browseui uxtheme shlwapi shell32 comctl32 gdi32 ole32 oleaut32 us
add_pch(browseui precomp.h "${PCH_SKIP_SOURCE}")
add_cd_file(TARGET browseui DESTINATION reactos/system32 FOR all)
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
target_compile_options(browseui PRIVATE -Wno-unused-but-set-variable)
endif()
if(NOT MSVC)
target_compile_options(browseui PRIVATE "-Wno-unused-but-set-variable")
# Binutils linker bug
if(LTCG)
add_target_link_flags(browseui "-Wl,--allow-multiple-definition")

View file

@ -14,8 +14,8 @@ list(APPEND SOURCE
add_library(shellbars OBJECT ${SOURCE})
target_link_libraries(shellbars PRIVATE atl_classes)
if(NOT MSVC)
target_compile_options(shellbars PRIVATE "-Wno-unused-but-set-variable")
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
target_compile_options(shellbars PRIVATE -Wno-unused-but-set-variable)
endif()
add_pch(shellbars shellbars.h SOURCE)

View file

@ -11,8 +11,8 @@ list(APPEND SOURCE
add_library(shellfind OBJECT ${SOURCE})
target_link_libraries(shellfind PRIVATE atl_classes)
if(NOT MSVC)
target_compile_options(shellfind PRIVATE "-Wno-unused-but-set-variable")
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
target_compile_options(shellfind PRIVATE -Wno-unused-but-set-variable)
endif()
add_pch(shellfind shellfind.h SOURCE)

View file

@ -33,8 +33,8 @@ add_importlibs(winmm advapi32 user32 msvcrt kernel32 ntdll)
add_pch(winmm winemm.h SOURCE)
add_cd_file(TARGET winmm DESTINATION reactos/system32 FOR all)
if(NOT MSVC)
target_compile_options(winmm PRIVATE "-Wno-unused-but-set-variable")
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
target_compile_options(winmm PRIVATE -Wno-unused-but-set-variable)
endif()
add_subdirectory(midimap)