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.
This commit is contained in:
Vojtech Bubnik 2021-02-10 11:04:46 +01:00
parent b7ae342e8e
commit 32b8a59fa5

View File

@ -249,6 +249,9 @@ if(WIN32)
if(MSVC) if(MSVC)
# BOOST_ALL_NO_LIB: Avoid the automatic linking of Boost libraries on Windows. Rather rely on explicit linking. # 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 ) 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(MSVC)
endif(WIN32) endif(WIN32)