Remove default /EHsc compiler flag
This prevents warning D9025 (one command-line option overrides another) on MSVC builds: some test targets are built with the /EHs-c- which conflicts with /EHsc.
This commit is contained in:
parent
41f0e24335
commit
421e7b4f29
|
@ -38,6 +38,11 @@ macro(fix_default_compiler_settings_)
|
||||||
# We prefer more strict warning checking for building Google Test.
|
# We prefer more strict warning checking for building Google Test.
|
||||||
# Replaces /W3 with /W4 in defaults.
|
# Replaces /W3 with /W4 in defaults.
|
||||||
string(REPLACE "/W3" "/W4" ${flag_var} "${${flag_var}}")
|
string(REPLACE "/W3" "/W4" ${flag_var} "${${flag_var}}")
|
||||||
|
|
||||||
|
# Prevent D9025 warning for targets that have exception handling
|
||||||
|
# turned off (/EHs-c- flag). Where required, exceptions are explicitly
|
||||||
|
# re-enabled using the cxx_exception_flags variable.
|
||||||
|
string(REPLACE "/EHsc" "" ${flag_var} "${${flag_var}}")
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user