mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 04:33:32 +00:00
[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:
parent
959729f6ee
commit
74ec94e12c
35 changed files with 99 additions and 57 deletions
|
@ -4,7 +4,7 @@ add_executable(symdump symdump.c)
|
|||
set_module_type(symdump win32cui)
|
||||
target_link_libraries(symdump wine)
|
||||
add_importlibs(symdump dbghelp shlwapi msvcrt kernel32 ntdll)
|
||||
if(NOT MSVC)
|
||||
target_compile_options(symdump PRIVATE "-Wno-unused-but-set-variable")
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
target_compile_options(symdump PRIVATE -Wno-unused-but-set-variable)
|
||||
endif()
|
||||
add_cd_file(TARGET symdump DESTINATION reactos/system32 FOR all)
|
||||
|
|
|
@ -71,7 +71,7 @@ list(APPEND SOURCE
|
|||
add_executable(ncftp ${SOURCE} ncftp.rc)
|
||||
set_module_type(ncftp win32cui)
|
||||
target_compile_definitions(ncftp PRIVATE HAVE_UTIME_H HAVE_UNISTD_H)
|
||||
if(NOT MSVC)
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
target_compile_options(ncftp PRIVATE -Wno-unused-but-set-variable)
|
||||
endif()
|
||||
add_importlibs(ncftp advapi32 user32 ws2_32 msvcrt kernel32)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
|
||||
add_executable(logevent logevent.c logevent.rc)
|
||||
set_module_type(logevent win32cui)
|
||||
if(NOT MSVC)
|
||||
target_compile_options(logevent PRIVATE "-Wno-unused-but-set-variable")
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
target_compile_options(logevent PRIVATE -Wno-unused-but-set-variable)
|
||||
endif()
|
||||
add_importlibs(logevent advapi32 msvcrt kernel32)
|
||||
add_cd_file(TARGET logevent DESTINATION reactos/system32 FOR all)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
|
||||
add_executable(pedump pedump.c pedump.rc)
|
||||
set_module_type(pedump win32cui)
|
||||
if(NOT MSVC)
|
||||
target_compile_options(pedump PRIVATE "-Wno-unused-but-set-variable")
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
target_compile_options(pedump PRIVATE -Wno-unused-but-set-variable)
|
||||
endif()
|
||||
add_importlibs(pedump msvcrt kernel32 ntdll)
|
||||
add_cd_file(TARGET pedump DESTINATION reactos/system32 FOR all)
|
||||
|
|
|
@ -11,8 +11,8 @@ list(APPEND SOURCE
|
|||
|
||||
add_executable(rosperf ${SOURCE} rosperf.rc)
|
||||
set_module_type(rosperf win32cui UNICODE)
|
||||
if(NOT MSVC)
|
||||
target_compile_options(rosperf PRIVATE "-Wno-unused-but-set-variable")
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
target_compile_options(rosperf PRIVATE -Wno-unused-but-set-variable)
|
||||
endif()
|
||||
add_importlibs(rosperf version msimg32 gdi32 shell32 advapi32 user32 ntdll msvcrt kernel32)
|
||||
add_cd_file(TARGET rosperf DESTINATION reactos/system32 FOR all)
|
||||
|
|
|
@ -9,8 +9,8 @@ list(APPEND SOURCE
|
|||
|
||||
add_executable(template_dialog ${SOURCE} dialog.rc)
|
||||
set_module_type(template_dialog win32cui)
|
||||
if(NOT MSVC)
|
||||
target_compile_options(template_dialog PRIVATE "-Wno-unused-but-set-variable")
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
target_compile_options(template_dialog PRIVATE -Wno-unused-but-set-variable)
|
||||
endif()
|
||||
add_importlibs(template_dialog user32 gdi32 comctl32 msvcrt kernel32 ntdll)
|
||||
add_cd_file(TARGET template_dialog DESTINATION reactos/system32 FOR all)
|
||||
|
|
|
@ -9,7 +9,7 @@ add_executable(advpack_winetest ${SOURCE})
|
|||
|
||||
target_compile_definitions(advpack_winetest PRIVATE USE_WINE_TODOS)
|
||||
|
||||
if (NOT MSVC)
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
target_compile_options(advpack_winetest PRIVATE -Wno-format-overflow)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ add_executable(fusion_winetest ${SOURCE})
|
|||
|
||||
target_compile_definitions(fusion_winetest PRIVATE USE_WINE_TODOS)
|
||||
|
||||
if (NOT MSVC)
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
target_compile_options(fusion_winetest PRIVATE -Wno-format-overflow)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ add_executable(msi_winetest
|
|||
|
||||
target_compile_definitions(msi_winetest PRIVATE __WINESRC__ USE_WINE_TODOS)
|
||||
|
||||
if (NOT MSVC)
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
target_compile_options(msi_winetest PRIVATE -Wno-format-overflow)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -30,7 +30,9 @@ add_importlibs(ole32_winetest oleaut32 ole32 user32 gdi32 advapi32 msvcrt kernel
|
|||
|
||||
if(MSVC)
|
||||
add_importlibs(ole32_winetest ntdll)
|
||||
else()
|
||||
endif()
|
||||
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
target_compile_options(ole32_winetest PRIVATE -Wno-format-overflow)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -4,6 +4,6 @@ set_module_type(services_winetest win32cui)
|
|||
add_importlibs(services_winetest user32 advapi32 msvcrt kernel32)
|
||||
add_rostests_file(TARGET services_winetest)
|
||||
|
||||
if (NOT MSVC)
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
target_compile_options(services_winetest PRIVATE -Wno-format-overflow)
|
||||
endif()
|
||||
|
|
|
@ -17,6 +17,6 @@ target_link_libraries(setupapi_winetest uuid)
|
|||
add_importlibs(setupapi_winetest advapi32 setupapi user32 shell32 msvcrt kernel32 ntdll)
|
||||
add_rostests_file(TARGET setupapi_winetest)
|
||||
|
||||
if (NOT MSVC)
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
target_compile_options(setupapi_winetest PRIVATE -Wno-format-overflow)
|
||||
endif()
|
||||
|
|
|
@ -38,7 +38,9 @@ add_importlibs(shell32_winetest shell32 shlwapi ole32 oleaut32 user32 gdi32 adva
|
|||
|
||||
if(MSVC)
|
||||
add_importlibs(shell32_winetest ntdll)
|
||||
else()
|
||||
endif()
|
||||
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
target_compile_options(shell32_winetest PRIVATE -Wno-format-overflow)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -40,7 +40,9 @@ add_executable(user32_winetest
|
|||
if(MSVC)
|
||||
# Disable warning C4477 (printf format warnings)
|
||||
remove_target_compile_option(user32_winetest "/we4477")
|
||||
elseif(GCC)
|
||||
endif()
|
||||
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
target_compile_options(user32_winetest PRIVATE -Wno-format-overflow)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -10,10 +10,12 @@ add_importlibs(version_winetest shell32 version msvcrt kernel32)
|
|||
|
||||
target_compile_definitions(version_winetest PRIVATE USE_WINE_TODOS)
|
||||
|
||||
if (NOT MSVC)
|
||||
target_compile_options(version_winetest PRIVATE -Wno-format-overflow)
|
||||
else()
|
||||
if(MSVC)
|
||||
add_importlibs(version_winetest ntdll)
|
||||
endif()
|
||||
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
target_compile_options(version_winetest PRIVATE -Wno-format-overflow)
|
||||
endif()
|
||||
|
||||
add_rostests_file(TARGET version_winetest)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue