diff --git a/client/windows/CMakeLists.txt b/client/windows/CMakeLists.txt index 808d367..00ec32e 100644 --- a/client/windows/CMakeLists.txt +++ b/client/windows/CMakeLists.txt @@ -39,7 +39,9 @@ add_definitions(-DUNICODE -D_UNICODE) # of modifying this function. function(APPLY_STANDARD_SETTINGS TARGET) target_compile_features(${TARGET} PUBLIC cxx_std_17) - target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") + # /utf-8: 按 UTF-8 解析源码,否则 zh-CN 机器(代码页 936)对含中文注释的 runner + # 源码(如 win32_window.cpp)报 C4819,叠加 /WX 直接编译失败。 + target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100" /utf-8) target_compile_options(${TARGET} PRIVATE /EHsc) target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>")