Skip to content

Commit

Permalink
Added generator expression to /utf-8 compile option (#3995)
Browse files Browse the repository at this point in the history
Do not pass the compile options in the project to other compilers such as nvcc
  • Loading branch information
ChristianGebhardt authored Jun 9, 2024
1 parent d4a8d26 commit 077e4ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 077e4ae

Please sign in to comment.