From 2bc1443662f78bb9272ab0d4cc6e37e89eb4b549 Mon Sep 17 00:00:00 2001 From: Ethan Stoner Date: Thu, 3 Sep 2026 10:44:25 -0700 Subject: [PATCH] Build nolocale-test with /utf-8 on MSVC 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. --- test/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index c36ba396f038..fd521626d067 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -134,6 +134,9 @@ if (FMT_PEDANTIC) PRIVATE ${PROJECT_SOURCE_DIR}/include) target_compile_definitions(nolocale-test PRIVATE FMT_STATIC_THOUSANDS_SEPARATOR=1) + if (MSVC) + target_compile_options(nolocale-test PRIVATE /utf-8) + endif () endif () # These tests are disabled on Windows because they take too long.