mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 22:33:00 +00:00
[CMAKE] Get rid of replace_compile_flags
Introduce a finer-grained remove_target_compile_option instead
This commit is contained in:
parent
b52fa999eb
commit
7e116f0ef3
27 changed files with 138 additions and 144 deletions
10
sdk/lib/3rdparty/freetype/CMakeLists.txt
vendored
10
sdk/lib/3rdparty/freetype/CMakeLists.txt
vendored
|
@ -5,11 +5,6 @@ add_definitions(
|
|||
|
||||
include_directories(include)
|
||||
|
||||
if(MSVC)
|
||||
# error C4312: 'type cast': conversion from 'unsigned long' to 'void *' of greater size
|
||||
replace_compile_flags("/we4312" " ")
|
||||
endif()
|
||||
|
||||
list(APPEND SOURCE
|
||||
src/autofit/autofit.c
|
||||
src/base/ftadvanc.c
|
||||
|
@ -60,7 +55,10 @@ list(APPEND SOURCE
|
|||
|
||||
add_library(freetype ${SOURCE})
|
||||
|
||||
if(GCC)
|
||||
if (MSVC)
|
||||
# error C4312: 'type cast': conversion from 'unsigned long' to 'void *' of greater size
|
||||
remove_target_compile_option(freetype "/we4312")
|
||||
elseif(GCC)
|
||||
target_compile_options(freetype PRIVATE -fno-builtin-malloc)
|
||||
elseif(CLANG)
|
||||
target_compile_options(freetype PRIVATE -Wno-tautological-constant-compare)
|
||||
|
|
4
sdk/lib/3rdparty/libxml2/CMakeLists.txt
vendored
4
sdk/lib/3rdparty/libxml2/CMakeLists.txt
vendored
|
@ -66,10 +66,10 @@ add_library(libxml2 ${SOURCE})
|
|||
|
||||
if(MSVC AND (NOT USE_CLANG_CL))
|
||||
# Unreferenced local variable
|
||||
replace_compile_flags("/we4101" " ")
|
||||
remove_target_compile_option(libxml2 "/we4101")
|
||||
target_compile_options(libxml2 PRIVATE "/wd4101")
|
||||
# Local variable initialized but not referenced
|
||||
replace_compile_flags("/we4189" " ")
|
||||
remove_target_compile_option(libxml2 "/we4189")
|
||||
else()
|
||||
target_compile_options(libxml2 PRIVATE "-w")
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue