mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 07:03:10 +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
4
sdk/lib/3rdparty/freetype/CMakeLists.txt
vendored
4
sdk/lib/3rdparty/freetype/CMakeLists.txt
vendored
|
@ -58,6 +58,8 @@ add_library(freetype ${SOURCE})
|
|||
if(CMAKE_C_COMPILER_ID STREQUAL "MSVC" AND ARCH STREQUAL "amd64")
|
||||
# error C4312: 'type cast': conversion from 'unsigned long' to 'void *' of greater size
|
||||
remove_target_compile_option(freetype "/we4312")
|
||||
elseif(GCC)
|
||||
endif()
|
||||
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
target_compile_options(freetype PRIVATE -fno-builtin-malloc)
|
||||
endif()
|
||||
|
|
2
sdk/lib/3rdparty/libxml2/CMakeLists.txt
vendored
2
sdk/lib/3rdparty/libxml2/CMakeLists.txt
vendored
|
@ -64,7 +64,7 @@ list(APPEND SOURCE
|
|||
|
||||
add_library(libxml2 ${SOURCE})
|
||||
|
||||
if(MSVC AND (NOT USE_CLANG_CL))
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
|
||||
# Unreferenced local variable
|
||||
remove_target_compile_option(libxml2 "/we4101")
|
||||
target_compile_options(libxml2 PRIVATE "/wd4101")
|
||||
|
|
|
@ -26,7 +26,7 @@ if(ARCH STREQUAL "i386")
|
|||
math/i386/alldiv_asm.s
|
||||
math/i386/aulldiv_asm.s
|
||||
)
|
||||
if (GCC AND CLANG)
|
||||
if (CMAKE_C_COMPILER_ID STREQUAL "Clang" AND NOT MSVC)
|
||||
list(APPEND MSVCRTEX_ASM_SOURCE
|
||||
math/i386/ceilf.S
|
||||
math/i386/floorf.S)
|
||||
|
@ -77,7 +77,7 @@ if(MSVC AND (ARCH STREQUAL "i386"))
|
|||
endif()
|
||||
|
||||
|
||||
if(GCC OR CLANG)
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
target_compile_options(msvcrtex PRIVATE $<$<COMPILE_LANGUAGE:C>:-Wno-main>)
|
||||
if(LTCG)
|
||||
target_compile_options(msvcrtex PRIVATE -fno-lto)
|
||||
|
|
|
@ -210,7 +210,7 @@ target_include_directories(wdf01000
|
|||
|
||||
target_link_libraries(wdf01000 aux_klib ntoskrnl_vista ${PSEH_LIB})
|
||||
|
||||
if(GCC)
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
target_compile_options(wdf01000
|
||||
PRIVATE -Wno-write-strings -Wno-unknown-pragmas -Wno-switch
|
||||
PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-Wno-reorder -Wno-invalid-offsetof -Wno-delete-non-virtual-dtor>)
|
||||
|
|
|
@ -5,7 +5,7 @@ add_definitions(
|
|||
-D_NTSYSTEM_
|
||||
-D_NTDLLBUILD_)
|
||||
|
||||
if (GCC)
|
||||
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
# Enable this again. CORE-17637
|
||||
add_compile_options(-Wunused-result)
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue