Files
fanlusky 9f5572c525 fix(build): 所有 MSVC 目标显式按 UTF-8 编译源文件
#548 修了 ngram,同类问题还有几处:源文件或头文件是无 BOM 的 UTF-8,
目标却没有 /utf-8,在代码页 936 的系统上注释会吞掉换行。

- ui:Controls.h 让 msimeui 与各 demo 单独构建失败,/utf-8 设为 PUBLIC
- server/tests/portable:input_key_policy.h 让 MSVC 构建失败
- engine test_windows_ipc_contract、tests/pipe-probe、windows/tests:C4819
- windows DLL:此前只靠 fmt 的 INTERFACE 选项带来 /utf-8,改为显式设置,
  否则 L"“" 等宽字符标点会在去掉 fmt 后静默变成乱码
2026-09-30 15:37:13 +08:00

14 lines
601 B
CMake

cmake_minimum_required(VERSION 3.25)
project(MsimePipeProbe LANGUAGES CXX)
if(NOT WIN32)
message(FATAL_ERROR "The pipe probe exercises a real Windows Server process")
endif()
set(MSIME_CONTRACTS_DIR "" CACHE PATH "Contracts from the repository's engine submodule")
add_executable(msime-ipc-probe main.cpp)
target_compile_features(msime-ipc-probe PRIVATE cxx_std_17)
target_compile_definitions(msime-ipc-probe PRIVATE NOMINMAX UNICODE _UNICODE)
target_include_directories(msime-ipc-probe PRIVATE "${MSIME_CONTRACTS_DIR}")
if(MSVC)
target_compile_options(msime-ipc-probe PRIVATE /utf-8)
endif()