Delete selective adding /EHsc. Leave it to users.

MSVC by default doesn't enable /EHsc either. Exception setting depends on user configurations.
This commit is contained in:
denchat 2019-05-11 18:50:18 +07:00 committed by GitHub
parent eaaa44c3ce
commit 02e472d63a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,19 +31,6 @@ if (MSVC)
# Disable MSVC warnings of POSIX functions.
target_compile_options(gmock PUBLIC -Wno-deprecated-declarations)
endif ()
# Insert FMT_MSVC_EH if user provides.
# if not, default to /EHsc in clang target msvc.
if (FMT_MSVC_EH)
set(FMT_CUSTOM_MSVC_EH ${FMT_MSVC_EH})
else ()
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(FMT_CUSTOM_MSVC_EH /EHsc)
else ()
set(FMT_CUSTOM_MSVC_EH)
endif ()
endif ()
target_compile_options(gmock PUBLIC ${FMT_CUSTOM_MSVC_EH})
endif ()
# GTest doesn't detect <tuple> with clang.