From f924d16e4789d6bde9def439ac50b778a1536384 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Wed, 11 Sep 2024 04:55:58 -0700 Subject: [PATCH] fix: pass /utf-8 only if the compiler is MSVC at build time --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ca64fff..1606e886 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -365,8 +365,8 @@ if (NOT MSVC) # Unicode is always supported on compilers other than MSVC. elseif (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>) else () target_compile_definitions(fmt PUBLIC FMT_UNICODE=0) endif ()