From a5cfbf369d2fccebc7cf73f5d73d32e4f7de3d26 Mon Sep 17 00:00:00 2001 From: Gabi Melman Date: Fri, 1 Nov 2024 16:49:37 +0200 Subject: [PATCH] Revert "Better support for FMT_UNICODE in cmake" This reverts commit d373093734f756da53e0e5e203c305a9614b9741. --- CMakeLists.txt | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 420cbe61..310ab61d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,9 +33,9 @@ elseif(NOT CMAKE_CXX_STANDARD) set(CMAKE_CXX_STANDARD_REQUIRED ON) endif() -# under msvc make sure __cplusplus, parallel build +# under msvc make sure __cplusplus, parallel build and utf-8 enabled if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - string(APPEND CMAKE_CXX_FLAGS " /Zc:__cplusplus /MP") + string(APPEND CMAKE_CXX_FLAGS " /Zc:__cplusplus /MP /utf-8") endif() set(CMAKE_CXX_EXTENSIONS OFF) @@ -283,20 +283,7 @@ if(SPDLOG_NO_EXCEPTIONS) target_compile_options(spdlog PRIVATE /EHs-c-) endif() endif() - # --------------------------------------------------------------------------------------- -# {fmt} lib requires /utf-8 flag or FMT_UNICODE=0 under MSVC -# --------------------------------------------------------------------------------------- -if(NOT SPDLOG_USE_STD_FORMAT) - if(MSVC) - if(SPDLOG_WCHAR_SUPPORT OR SPDLOG_WCHAR_CONSOLE) - target_compile_options(spdlog PUBLIC /utf-8) - else() - target_compile_definitions(spdlog PUBLIC FMT_UNICODE=0) - endif() - endif() - endif() - # Build binaries # --------------------------------------------------------------------------------------- if(SPDLOG_BUILD_EXAMPLE OR SPDLOG_BUILD_EXAMPLE_HO OR SPDLOG_BUILD_ALL)