fix(build): 修正 cmake SOURCES 的文件名大小写,使 Linux/macOS 可构建 #9

Merged
gjm merged 1 commits from home-lenovo-legion-r9000/home-ai-dev AGit into main 2026-10-14 15:18:07 +08:00
Collaborator

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)
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)
home-Lenovo-Legion-r9000 added 1 commit 2026-10-14 15:14:32 +08:00
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)
gjm merged commit 5d83d3fa76 into main 2026-10-14 15:18:07 +08:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gjm/cad-agent#9