Skip to content

Commit be3b0ee

Browse files
committed
🚨 Fix build
1 parent ce78273 commit be3b0ee

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎CMakeLists.txt‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ set(FMT_SYSTEM_HEADERS ON CACHE BOOL "" FORCE)
1717
set(FMT_INSTALL OFF CACHE BOOL "" FORCE)
1818
add_subdirectory(lib/fmt)
1919
target_link_libraries(stringify PUBLIC fmt::fmt)
20+
# Recent MSVC versions define __cpp_nontype_template_args >= 201911L, which makes fmt switch to a
21+
# templated `operator""_a` (using a fixed_string non-type template parameter) that MSVC fails to
22+
# match against `"name"_a`, breaking the build. Force fmt to use its runtime `const char*` overload.
23+
target_compile_definitions(fmt PUBLIC FMT_USE_NONTYPE_TEMPLATE_ARGS=0)
2024
install(FILES "lib/fmt/LICENSE" DESTINATION "license/fmt")
2125

2226
# Set warning level

0 commit comments

Comments
 (0)