build: migrate from ctx to pure CMake + Conan 2 #1

Open
carrot wants to merge 2 commits from migrate/cmake-manual into main
Owner

概述

项目构建系统从 ctx 迁移到纯 CMake + Conan 2。

变更

  • 删除 cpps.toml,项目完全脱离 ctx 工具依赖
  • 重写 conanfile.py:手动 layout + CMakeDeps + CMakeToolchain
  • 重写 CMakePresets.json:Ninja + debug/release 分离 preset
  • 目录重组:modules/*src/{foundation,data,protocol,app,tools}/*
  • 17 个模块按 5 层架构组织,每个模块独立 CMakeLists.txt
  • 重写所有 CMakeLists.txt(根 + 层级 + 17 模块 + project_compiler)
  • yaml-cpp 从系统安装改为 Conan 2 依赖(yaml-cpp/0.8.0
  • 目标名统一:photolink_* + ALIAS 向后兼容
  • 删除 copy/ 历史残留、tools/logviewer/ 重复模块
  • tools/* 独立工具迁移到 src/tools/
  • taos_writer 条件编译(需 TDengine)
  • 更新 .opencode/agents/cpp-developer.mdAGENTS.md
  • 新增 doc/migration_plan.md 完整迁移方案
  • 新增 .gitignore

构建验证

conan install . -pr=debug -of=build/debug --build=missing
cmake --preset debug
cmake --build --preset debug -j$(nproc)  # 166 targets ✅
ctest --preset debug --output-on-failure  # 11/11 核心测试通过 ✅

预存失败(与迁移前一致)

测试 原因
ctrl_tests ZMQ 连接超时
config_tests 预存失败
watchDog_tests 集成测试超时
sub_shell_tests 需要 .so 插件
rtdbview_tests 预存失败
## 概述 项目构建系统从 ctx 迁移到纯 CMake + Conan 2。 ## 变更 - 删除 `cpps.toml`,项目完全脱离 ctx 工具依赖 - 重写 `conanfile.py`:手动 layout + CMakeDeps + CMakeToolchain - 重写 `CMakePresets.json`:Ninja + debug/release 分离 preset - 目录重组:`modules/*` → `src/{foundation,data,protocol,app,tools}/*` - 17 个模块按 5 层架构组织,每个模块独立 CMakeLists.txt - 重写所有 CMakeLists.txt(根 + 层级 + 17 模块 + project_compiler) - yaml-cpp 从系统安装改为 Conan 2 依赖(`yaml-cpp/0.8.0`) - 目标名统一:`photolink_*` + ALIAS 向后兼容 - 删除 `copy/` 历史残留、`tools/logviewer/` 重复模块 - `tools/*` 独立工具迁移到 `src/tools/` - taos_writer 条件编译(需 TDengine) - 更新 `.opencode/agents/cpp-developer.md` 和 `AGENTS.md` - 新增 `doc/migration_plan.md` 完整迁移方案 - 新增 `.gitignore` ## 构建验证 ```bash conan install . -pr=debug -of=build/debug --build=missing cmake --preset debug cmake --build --preset debug -j$(nproc) # 166 targets ✅ ctest --preset debug --output-on-failure # 11/11 核心测试通过 ✅ ``` ## 预存失败(与迁移前一致) | 测试 | 原因 | |------|------| | ctrl_tests | ZMQ 连接超时 | | config_tests | 预存失败 | | watchDog_tests | 集成测试超时 | | sub_shell_tests | 需要 .so 插件 | | rtdbview_tests | 预存失败 |
删除 cpps.toml,重写 conanfile.py/CMakePresets.json/全部 CMakeLists.txt
模块按5层架构重组: modules/* -> src/{foundation,data,protocol,app,tools}/*
yaml-cpp 从系统安装改为 Conan 2 依赖(yaml-cpp/0.8.0)
目标名统一: photolink_* + ALIAS 向后兼容
删除 copy/ 历史残留、tools/logviewer/ 重复模块
taos_writer 条件编译(需 TDengine)
更新 .opencode/agents/cpp-developer.md 和 AGENTS.md
构建验证: 166 targets 编译通过, 11/11 核心测试通过
carrot self-assigned this 2026-07-24 12:55:37 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin migrate/cmake-manual:migrate/cmake-manual
git switch migrate/cmake-manual

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff migrate/cmake-manual
git switch migrate/cmake-manual
git rebase main
git switch main
git merge --ff-only migrate/cmake-manual
git switch migrate/cmake-manual
git rebase main
git switch main
git merge --no-ff migrate/cmake-manual
git switch main
git merge --squash migrate/cmake-manual
git switch main
git merge --ff-only migrate/cmake-manual
git switch main
git merge migrate/cmake-manual
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: carrot/PhotoLink#1
No description provided.