[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

@ -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()

View file

@ -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")