[CMAKE] Get rid of replace_compile_flags

Introduce a finer-grained remove_target_compile_option instead
This commit is contained in:
Jérôme Gardou 2020-09-18 11:49:18 +02:00 committed by Jérôme Gardou
parent b52fa999eb
commit 7e116f0ef3
27 changed files with 138 additions and 144 deletions

View file

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