Skip to content

Commit

Permalink
Enable enforce-checks-test for MSVC, too
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielaE authored and vitaut committed Jun 10, 2021
1 parent 36c2948 commit 59a298f
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 59a298f

Please sign in to comment.