diff --git a/CMakeLists.txt b/CMakeLists.txt index cb59656ed..10049391e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,6 +53,14 @@ if (WIN32) add_compile_definitions(_CRT_SECURE_NO_WARNINGS) endif() +# force MSVC compiler charset to utf-8 +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") + add_compile_options("$<$:/source-charset:utf-8>") + add_compile_options("$<$:/source-charset:utf-8>") + add_compile_options("$<$:/execution-charset:utf-8>") + add_compile_options("$<$:/execution-charset:utf-8>") +endif() + # # option list #