Enable correct __cplusplus macro when building with MSVC
This commit is contained in:
parent
08ca40ea91
commit
51c860de90
@ -178,6 +178,10 @@ set(FMT_SOURCES src/format.cc src/os.cc)
|
||||
add_library(fmt ${FMT_SOURCES} ${FMT_HEADERS} README.rst ChangeLog.rst)
|
||||
add_library(fmt::fmt ALIAS fmt)
|
||||
|
||||
if (MSVC)
|
||||
target_compile_options(fmt PRIVATE /Zc:__cplusplus)
|
||||
endif ()
|
||||
|
||||
if (HAVE_STRTOD_L)
|
||||
target_compile_definitions(fmt PUBLIC FMT_LOCALE)
|
||||
endif ()
|
||||
|
||||
@ -97,6 +97,7 @@ add_fmt_test(gtest-extra-test)
|
||||
add_fmt_test(format-test mock-allocator.h)
|
||||
if (MSVC)
|
||||
target_compile_options(format-test PRIVATE /bigobj)
|
||||
target_compile_options(format-test PRIVATE /Zc:__cplusplus)
|
||||
endif ()
|
||||
if (NOT (MSVC AND BUILD_SHARED_LIBS))
|
||||
add_fmt_test(format-impl-test)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user