MSVC by default doesn't enable /EHsc also. Just keep it most simple.
This commit is contained in:
denchat 2019-05-11 18:50:23 +07:00 committed by GitHub
parent 02e472d63a
commit f1fd5accaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -162,21 +162,6 @@ if (FMT_PEDANTIC)
target_compile_options(fmt PRIVATE ${PEDANTIC_COMPILE_FLAGS})
endif ()
# Insert FMT_MSVC_EH if user provides.
# If not, default to /EHsc in clang target msvc.
if (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(fmt PRIVATE ${FMT_CUSTOM_MSVC_EH})
endif ()
target_compile_features(fmt INTERFACE ${FMT_REQUIRED_FEATURES})
target_include_directories(fmt PUBLIC