Turn on exceptions automatically in MSVC

User must manually turn on exceptions otherwise error occurs when compiling `format.cc` as below

fmt-master\include\fmt/format-inl.h(891,3): error: cannot use 'try' with exceptions disabled
  FMT_TRY {
  ^
This commit is contained in:
denchat 2019-05-09 02:14:14 +07:00 committed by GitHub
parent abb3050e39
commit 63d6445592
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -161,6 +161,9 @@ endif ()
if (FMT_PEDANTIC)
target_compile_options(fmt PRIVATE ${PEDANTIC_COMPILE_FLAGS})
endif ()
if (MSVC)
target_compile_options(fmt PRIVATE /EHsc)
endif ()
target_compile_features(fmt INTERFACE ${FMT_REQUIRED_FEATURES})