gjm
|
526d5f8911
|
fix(build): 修正 cmake SOURCES 的文件名大小写,使 Linux/macOS 可构建
cmake 的 SOURCES 列表引用的文件名与 git 跟踪名仅大小写不同。Windows 大小写不
敏感故能编译,但在 Linux/macOS 上 git checkout 会按跟踪名落盘,CMake 精确匹配
不到便报 "Cannot find source file"。
- src/cad_mcp_frame/cmakelists.txt: stdafx.cpp → StdAfx.cpp,
mcp_configParser.cpp → mcp_ConfigParser.cpp
- src/cad_mcp_plugins/cmakelists.txt: stdafx.cpp → StdAfx.cpp
统一方向取「大写」,与既有引用保持一致:
- 所有 #include "StdAfx.h"、target_precompile_headers(... PRIVATE StdAfx.h)
- #include "mcp_ConfigParser.h"、class mcp_ConfigParser
仅上述两处 SOURCES 列表写成了小写,是唯一的例外,故改 cmake 而非重命名文件。
同时把本机磁盘上的 mcp_configParser.cpp 规范化为 mcp_ConfigParser.cpp,使工作
副本与仓库一致(Windows 大小写不敏感,不影响构建)。
验证:
- 全项目扫描 cmake/include 引用与 git ls-files 的精确大小写匹配 → 无不一致
- cmake --build --preset R230 --config Debug 成功(CMake 重新配置正常,
源码未变故未重链接,无需关闭 CAD)
|
2026-10-14 15:14:23 +08:00 |
|