From 077e4ae746cde56559d72babe278e3d189bb2b3a Mon Sep 17 00:00:00 2001 From: ChristianGebhardt Date: Sun, 9 Jun 2024 22:05:17 +0200 Subject: [PATCH] Added generator expression to /utf-8 compile option (#3995) Do not pass the compile options in the project to other compilers such as nvcc --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c0bfc9c412c..6763e7a9fa7e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 $<$:/utf-8>) + target_compile_options(fmt-header-only INTERFACE $<$:/utf-8>) endif () target_compile_definitions(fmt-header-only INTERFACE FMT_HEADER_ONLY=1)