From 32b8a59fa505f7260a48cc25aa92570791a74dce Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Wed, 10 Feb 2021 11:04:46 +0100 Subject: [PATCH] Enabling /utf-8 on MSVC. Hopefully a fix of fix some msvc compile error under Chinese Windows system. #5583 Hopefully it will not break any localization. --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 39bd25be8..760797948 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -249,6 +249,9 @@ if(WIN32) if(MSVC) # BOOST_ALL_NO_LIB: Avoid the automatic linking of Boost libraries on Windows. Rather rely on explicit linking. add_definitions(-DBOOST_ALL_NO_LIB -DBOOST_USE_WINAPI_VERSION=0x601 -DBOOST_SYSTEM_USE_UTF8 ) + # Force the source code encoding to UTF-8. See PrusaSlicer GH pull request #5583 + add_compile_options("$<$:/utf-8>") + add_compile_options("$<$:/utf-8>") endif(MSVC) endif(WIN32)