Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVojtech Bubnik <bubnikv@gmail.com>2021-02-10 13:04:46 +0300
committerVojtech Bubnik <bubnikv@gmail.com>2021-02-10 13:05:02 +0300
commit32b8a59fa505f7260a48cc25aa92570791a74dce (patch)
tree7f619b8d6aecf57431e6adacfc566c10c2e787ad /CMakeLists.txt
parentb7ae342e8e43bb7c35619518b2d6e223509b44a8 (diff)
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.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
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("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
+ add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
endif(MSVC)
endif(WIN32)