Skip to content

cmake/template: ship a shared build-summary helper (currently pacs-only) #668

@kcenon

Description

@kcenon

What

Promote pacs_system/cmake/summary.cmake (a build-configuration summary printer invoked at the end of the root CMakeLists.txt) into the canonical ecosystem template.

Proposed signature:

kcenon_template_print_summary(
    PROJECT     <name>
    [BANNER     <text>]
    [OPTIONS    <var>...]
    [TARGETS    <tgt>...]
    [DEPENDENCIES <var=display>...]
)
    Print a uniform build summary block to STDOUT at configure time.

Why

Every system in the ecosystem already has the same shape of message(STATUS "...") summary at the bottom of CMakeLists.txt -- typically: project name, version, build type, enabled options, found dependencies. Today each system writes its own variant. pacs_system has the most polished version (cmake/summary.cmake, ~1.9 KB).

Lifting it into the template:

  • removes a "pacs-only" deviation (currently documented in pacs_system/cmake/DEVIATIONS.md)
  • gives every other system a one-line adoption path
  • keeps the summary format consistent in CI logs across systems

Where

  • New file: cmake/template/summary.cmake
  • Updated template adoption checklist in cmake/template/README.md
  • Template VERSION bump: 1.0.0 -> 1.1.0 (MINOR per template versioning policy: new module added)

How

Acceptance Criteria

  • New summary.cmake template module landed
  • README adoption checklist mentions include(summary) step (post-test, pre-end)
  • VERSION bumped
  • At least one system (recommend common_system itself) adopts the helper as the reference implementation
  • pacs_system can delete its local cmake/summary.cmake and update DEVIATIONS.md to remove the entry

Source Reference

Existing pacs implementation: https://github.com/kcenon/pacs_system/blob/develop/cmake/summary.cmake.

Context

Discovered during the cmake-template alignment of pacs_system (kcenon/pacs_system#1140, part of kcenon/pacs_system#1137).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions