summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cb59656e..10049391 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("$<$<COMPILE_LANGUAGE:C>:/source-charset:utf-8>")
+ add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:/source-charset:utf-8>")
+ add_compile_options("$<$<COMPILE_LANGUAGE:C>:/execution-charset:utf-8>")
+ add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:/execution-charset:utf-8>")
+endif()
+
#
# option list
#