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_SOURCES} ${FMT_HEADERS} README.rst ChangeLog.rst)
|
||||||
add_library(fmt::fmt ALIAS fmt)
|
add_library(fmt::fmt ALIAS fmt)
|
||||||
|
|
||||||
|
if (MSVC)
|
||||||
|
target_compile_options(fmt PRIVATE /Zc:__cplusplus)
|
||||||
|
endif ()
|
||||||
|
|
||||||
if (HAVE_STRTOD_L)
|
if (HAVE_STRTOD_L)
|
||||||
target_compile_definitions(fmt PUBLIC FMT_LOCALE)
|
target_compile_definitions(fmt PUBLIC FMT_LOCALE)
|
||||||
endif ()
|
endif ()
|
||||||
|
|||||||
@ -97,6 +97,7 @@ add_fmt_test(gtest-extra-test)
|
|||||||
add_fmt_test(format-test mock-allocator.h)
|
add_fmt_test(format-test mock-allocator.h)
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
target_compile_options(format-test PRIVATE /bigobj)
|
target_compile_options(format-test PRIVATE /bigobj)
|
||||||
|
target_compile_options(format-test PRIVATE /Zc:__cplusplus)
|
||||||
endif ()
|
endif ()
|
||||||
if (NOT (MSVC AND BUILD_SHARED_LIBS))
|
if (NOT (MSVC AND BUILD_SHARED_LIBS))
|
||||||
add_fmt_test(format-impl-test)
|
add_fmt_test(format-impl-test)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user