From f62d747b236a98b8ad13293079fbc58f639a1003 Mon Sep 17 00:00:00 2001 From: ValKmjolnir Date: Thu, 6 Jun 2024 00:00:48 +0800 Subject: [PATCH] :bug: really enable utf8 on MSVC --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e6c3521..64d7e3c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,10 @@ set(CMAKE_CXX_STANDARD_REQUIRED True) set(CMAKE_CXX_FLAGS_RELEASE_INIT "-Wshadow -Wall") add_compile_options(-fPIC) +# MSVC needs this command option to really enable utf-8 output +if(MSVC) + add_compile_options(/utf-8) +endif() # generate release executables set(CMAKE_BUILD_TYPE "Release")