mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 11:31:40 +00:00
[CMAKE] Elimitate the use of GCC and CLANG variables
This commit is contained in:
parent
6f4be52a1c
commit
f155b9377f
32 changed files with 78 additions and 116 deletions
|
@ -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})
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -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})
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue