[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

@ -7,9 +7,6 @@ if(SEPARATE_DBG)
endif()
if(MSVC)
# We don't need hotpatching
replace_compile_flags("/hotpatch" " ")
# Explicitly use string pooling
add_compile_flags("/GF")
endif()
@ -285,6 +282,10 @@ if(MSVC)
add_target_link_flags(freeldr_pe_dbg "/ignore:4078 /ignore:4254 /DRIVER /FIXED /FILEALIGN:0x200 /ALIGN:0x200")
add_linker_script(freeldr_pe_dbg freeldr_i386.msvc.lds)
endif()
# We don't need hotpatching
remove_target_compile_option(freeldr_pe "/hotpatch")
remove_target_compile_option(freeldr_pe_dbg "/hotpatch")
remove_target_compile_option(freeldr_common "/hotpatch")
else()
add_target_link_flags(freeldr_pe "-Wl,--strip-all,--exclude-all-symbols,--file-alignment,0x200,--section-alignment,0x200")
add_linker_script(freeldr_pe freeldr_i386.lds)