Kaynağa Gözat

cmake: Specify utf-8 for MSVC builds

If there is no BOM, MSVC defaults to the user's code page which can
result in errors if UTF-8 characters are present in the source files.
Richard Stanway 3 yıl önce
ebeveyn
işleme
510f0116a6
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 2 1
      cmake/Modules/CompilerConfig.cmake

+ 2 - 1
cmake/Modules/CompilerConfig.cmake

@@ -67,7 +67,8 @@ if(OS_WINDOWS AND MSVC)
     /DUNICODE
     /D_UNICODE
     /D_CRT_SECURE_NO_WARNINGS
-    /D_CRT_NONSTDC_NO_WARNINGS)
+    /D_CRT_NONSTDC_NO_WARNINGS
+    /utf-8)
 
   add_link_options(
     "LINKER:/OPT:REF"