Added generator expression to /utf-8 compile option (#3995)

Do not pass the compile options in the project to other compilers such as nvcc
This commit is contained in:
ChristianGebhardt 2024-06-09 22:05:17 +02:00 committed by GitHub
parent d4a8d26c55
commit 077e4ae746
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -350,8 +350,8 @@ add_library(fmt::fmt-header-only ALIAS fmt-header-only)
if (MSVC AND FMT_UNICODE)
# Unicode support requires compiling with /utf-8.
target_compile_options(fmt PUBLIC /utf-8)
target_compile_options(fmt-header-only INTERFACE /utf-8)
target_compile_options(fmt PUBLIC $<$<COMPILE_LANGUAGE:CXX>:/utf-8>)
target_compile_options(fmt-header-only INTERFACE $<$<COMPILE_LANGUAGE:CXX>:/utf-8>)
endif ()
target_compile_definitions(fmt-header-only INTERFACE FMT_HEADER_ONLY=1)