From 9edab1b5a1da78e646dee9f4e9ffd4e8f7796cd5 Mon Sep 17 00:00:00 2001 From: miyanyan <40262194+miyanyan@users.noreply.github.com> Date: Fri, 22 Nov 2024 17:42:35 +0800 Subject: [PATCH] pass /utf-8 only when compiler is MSVC (#3260) --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c5bc7b883..2fcdfff1b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -274,8 +274,8 @@ if(MSVC) target_compile_options(spdlog PRIVATE "/Zc:__cplusplus") target_compile_options(spdlog_header_only INTERFACE "/Zc:__cplusplus") if(SPDLOG_MSVC_UTF8) - target_compile_options(spdlog PUBLIC "/utf-8") - target_compile_options(spdlog_header_only INTERFACE "/utf-8") + target_compile_options(spdlog PUBLIC $<$,$>:/utf-8>) + target_compile_options(spdlog_header_only INTERFACE $<$,$>:/utf-8>) endif() endif()