Skip to content

chore(cmake): extract kcenon-cmake-template from pacs_system #659

Description

@kcenon

Summary

Extract pacs_system's modular cmake/*.cmake decomposition into a reusable kcenon-cmake-template/ so the other 7 systems can adopt it as a drop-in. Today only pacs_system follows this pattern; the other 7 carry monolithic root CMakeLists.txt files (range 150-1032 lines).

Part of #656. Depends on the layout standard from #658.

Why

  • pacs_system already proves the modular pattern works in production
  • Extracting once and reusing saves the same decomposition work in 7 systems
  • A versioned template makes upgrades coordinated rather than ad-hoc

Scope

  1. Identify the 8 canonical modules in pacs_system: options.cmake, compiler.cmake, dependencies.cmake, targets.cmake, install.cmake, testing.cmake, examples.cmake, warnings.cmake
  2. Generalize each module to remove pacs-specific assumptions (project name, namespace, target list)
  3. Place the template under cmake/template/ (or as a separate directory-scoped artifact) with a README explaining adoption steps
  4. Document the template version and how downstream systems track upgrades

Acceptance Criteria

  • All 8 cmake modules extracted into the template location
  • Each module has a header comment naming its responsibility and required input variables
  • Template README describes: directory layout, required variables, adoption checklist, version policy
  • common_system itself adopts the template (replacing existing root CMakeLists.txt fallbacks)
  • Existing common_system build/tests still pass after adoption

Out of Scope

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions