diff options
-rw-r--r-- | kde-modules/KDECompilerSettings.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kde-modules/KDECompilerSettings.cmake b/kde-modules/KDECompilerSettings.cmake index 63a5ce1f..ebad20eb 100644 --- a/kde-modules/KDECompilerSettings.cmake +++ b/kde-modules/KDECompilerSettings.cmake @@ -237,6 +237,13 @@ if (CMAKE_SYSTEM_NAME STREQUAL GNU) set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -pthread") endif() +if (MSVC) + # Our source files are UTF-8 encoded, and assuming that is also the + # default behavior of GCC/Clang. Not so for MSVC though, so force + # that to UTF-8 explicitly, as that will otherwise cause compile-time + # and runtime issues when dealing with string literals outside of 7-bit ASCII. + add_compile_options(/utf-8) +endif() ############################################################ |