mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 04:38:49 +00:00
cmake: Use Policy CMP0117 for more sensible RTTI flag configuration on MSVC.
This commit is contained in:
parent
7f2ea688d2
commit
a5e85627b0
3 changed files with 34 additions and 21 deletions
16
CMake/RemoveCompileFlag.cmake
Normal file
16
CMake/RemoveCompileFlag.cmake
Normal file
|
@ -0,0 +1,16 @@
|
|||
# from https://stackoverflow.com/a/49216539
|
||||
# The linked answer does some weird preconfiguring by manually splitting the CMAKE_CXX_FLAGS variable and applying it to a target,
|
||||
# but as far as I can tell none of that is necessary, this works just fine as-is.
|
||||
|
||||
#
|
||||
# Removes the specified compile flag from the specified target.
|
||||
# _target - The target to remove the compile flag from
|
||||
# _flag - The compile flag to remove
|
||||
#
|
||||
macro(remove_cxx_flag_from_target _target _flag)
|
||||
get_target_property(_target_cxx_flags ${_target} COMPILE_OPTIONS)
|
||||
if(_target_cxx_flags)
|
||||
list(REMOVE_ITEM _target_cxx_flags ${_flag})
|
||||
set_target_properties(${_target} PROPERTIES COMPILE_OPTIONS "${_target_cxx_flags}")
|
||||
endif()
|
||||
endmacro()
|
Loading…
Add table
Add a link
Reference in a new issue