mirror of
https://github.com/fmtlib/fmt.git
synced 2026-09-13 22:32:36 +08:00
Build nolocale-test with /utf-8 on MSVC (#4919)
nolocale-test compiles src/format.cc directly, so it does not pick up the /utf-8 that CMakeLists.txt adds to the fmt target. On MSVC the static_assert in base.h then fires: "Unicode support requires compiling with /utf-8". The target only exists under FMT_PEDANTIC, which the Windows workflow does not set, so this has not shown up in CI. unicode-test already guards the same flag the same way.
This commit is contained in:
parent
8be4b46114
commit
2d4d8a13c2
@ -134,6 +134,8 @@ if (FMT_PEDANTIC)
|
||||
PRIVATE ${PROJECT_SOURCE_DIR}/include)
|
||||
target_compile_definitions(nolocale-test
|
||||
PRIVATE FMT_STATIC_THOUSANDS_SEPARATOR=1)
|
||||
target_compile_options(nolocale-test
|
||||
PRIVATE $<$<CXX_COMPILER_ID:MSVC>:/utf-8>)
|
||||
endif ()
|
||||
|
||||
# These tests are disabled on Windows because they take too long.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user