[CMAKE] Elimitate the use of GCC and CLANG variables

This commit is contained in:
Victor Perevertkin 2022-05-26 01:37:23 +03:00
parent 6f4be52a1c
commit f155b9377f
No known key found for this signature in database
GPG key ID: C750B7222E9C7830
32 changed files with 78 additions and 116 deletions

View file

@ -1,5 +1,5 @@
if (NOT (GCC AND (ARCH STREQUAL "amd64")))
if (MSVC OR ARCH STREQUAL "i386")
#FIXME _setjmp definitions in CRT headers is wrong
add_subdirectory(ms)
list(APPEND SOURCE ms_seh.c)
@ -12,7 +12,7 @@ list(APPEND SOURCE
testlist.c)
add_executable(compiler_apitest ${SOURCE})
if (NOT (GCC AND (ARCH STREQUAL "amd64")))
if (MSVC OR ARCH STREQUAL "i386")
target_link_libraries(compiler_apitest ms_seh_test)
endif()
target_link_libraries(compiler_apitest wine ${PSEH_LIB})

View file

@ -1,5 +1,5 @@
if (GCC)
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
add_compile_options(-fno-builtin)
endif()

View file

@ -21,7 +21,7 @@ add_executable(advapi32_winetest
${SOURCE}
${PCH_SKIP_SOURCE})
if(USE_CLANG_CL OR (NOT MSVC))
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
target_compile_options(advapi32_winetest PRIVATE "-Wno-format")
endif()

View file

@ -56,7 +56,7 @@ if(MSVC)
endif()
endif()
if(USE_CLANG_CL OR (NOT MSVC))
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
target_compile_options(kernel32_winetest PRIVATE "-Wno-format")
endif()

View file

@ -27,11 +27,8 @@ target_compile_definitions(msvcrt_winetest PRIVATE
_CRT_NONSTDC_NO_DEPRECATE
__msvcrt_ulong=ULONG)
if ((NOT MSVC) OR USE_CLANG_CL)
if (NOT USE_CLANG_CL)
target_compile_options(msvcrt_winetest PRIVATE -Wno-stringop-truncation)
endif()
target_compile_options(msvcrt_winetest PRIVATE -Wno-format)
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
target_compile_options(msvcrt_winetest PRIVATE -Wno-format -Wno-stringop-truncation)
endif()
set_module_type(msvcrt_winetest win32cui)

View file

@ -40,7 +40,7 @@ if(MSVC AND ARCH STREQUAL "amd64")
target_compile_options(ntdll_winetest PRIVATE /wd4334)
endif()
if(USE_CLANG_CL OR (NOT MSVC))
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
target_compile_options(ntdll_winetest PRIVATE "-Wno-format")
endif()

View file

@ -40,11 +40,12 @@ endif()
add_executable(rpcrt4_winetest ${SOURCE})
if(USE_CLANG_CL OR (NOT MSVC))
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
target_compile_options(rpcrt4_winetest PRIVATE "-Wno-format")
if(USE_CLANG_CL)
target_compile_options(rpcrt4_winetest PRIVATE "-Wno-cast-calling-convention")
endif()
endif()
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
target_compile_options(rpcrt4_winetest PRIVATE "-Wno-cast-calling-convention")
endif()
target_link_libraries(rpcrt4_winetest uuid wine ${PSEH_LIB})

View file

@ -14,7 +14,7 @@ list(APPEND SOURCE
add_executable(winmm_winetest ${SOURCE})
if(USE_CLANG_CL OR (NOT MSVC))
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
target_compile_options(winmm_winetest PRIVATE "-Wno-format")
endif()

View file

@ -3,7 +3,7 @@ include_directories(BEFORE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
add_executable(ws2_32_winetest protocol.c sock.c testlist.c)
if(USE_CLANG_CL OR (NOT MSVC))
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
target_compile_options(ws2_32_winetest PRIVATE "-Wno-format")
endif()