Enable enforce-checks-test for MSVC, too

This commit is contained in:
Daniela Engert 2021-06-10 16:19:22 +02:00 committed by Victor Zverovich
parent 36c2948225
commit 59a298f124

View File

@ -82,6 +82,9 @@ if (MSVC)
target_compile_options(unicode-test PRIVATE /utf-8)
endif ()
add_fmt_test(xchar-test)
add_fmt_test(enforce-checks-test)
target_compile_definitions(enforce-checks-test PRIVATE
-DFMT_ENFORCE_COMPILE_STRING)
if (FMT_CAN_MODULE)
# The tests need {fmt} to be compiled as traditional library
@ -101,13 +104,6 @@ if (FMT_CAN_MODULE)
endif ()
endif ()
if (NOT MSVC)
# FMT_ENFORCE_COMPILE_STRING is not supported under MSVC due to compiler bugs.
add_fmt_test(enforce-checks-test)
target_compile_definitions(enforce-checks-test PRIVATE
-DFMT_ENFORCE_COMPILE_STRING)
endif ()
if (NOT DEFINED MSVC_STATIC_RUNTIME AND MSVC)
foreach (flag_var
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE