Skip to content

build: keep the umbrella header out of the source_group tree - #427

Merged
sgerbino merged 1 commit into
cppalliance:developfrom
sgerbino:pr/cmake-source-group-umbrella
Nov 19, 2026
Merged

sgerbino merged 1 commit into
cppalliance:developfrom
sgerbino:pr/cmake-source-group-umbrella

Conversation

@sgerbino

@sgerbino sgerbino commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

CMake 4.5 rejects a file passed to source_group(TREE <root>) that does not lie under <root>. The header list also holds the umbrella header include/boost/corosio.hpp, which sits beside the tree rather than in it, so configuring fails with "is not a prefix of file". GitHub's macOS runners and the docs job now ship CMake 4.5.0.

The umbrella header is already placed in its own group by the source_group("" FILES ...) line above, so it is now left out of the tree group. Nothing else changes: the header still belongs to the target, and every other TREE call in the repository only receives files under its own root.

Checked with CMake 4.4.5 locally: configure succeeds, and the trace shows the tree group no longer receives the umbrella header. CMake 4.5 itself was not available locally, so CI is the check there.

CI builds against capy develop, whose CMakeLists has the same problem, so cppalliance/capy#490 has to merge first.

Summary by CodeRabbit

  • Chores
    • Updated how headers are organized in the project’s source groups.

CMake 4.5 rejects a source_group(TREE) file that lies outside the tree's root, and the header list also holds include/boost/corosio.hpp, so configuring failed. The header is already grouped on its own.
@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

CMake groups include/boost/corosio.hpp separately and excludes it from the headers passed to the include-tree grouping.

Changes: CMake Header Grouping

Layer / File(s) Summary
Header source grouping
CMakeLists.txt
CMake groups the umbrella header separately and removes it from the list passed to the include-tree grouping. Other headers remain grouped under the include tree.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Suggested reviewers: vinniefalco

Merge Risk: Minimal · up to 69737

This change fixes a CMake source-grouping configuration failure under newer CMake versions and does not alter build outputs or runtime behavior. The remaining check is CI on CMake 4.5. Merge readiness risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "build: keep the umbrella header out of the source_group tree" matches the change. The CMakeLists.txt change removes include/boost/corosio.hpp from the source_group(TREE ...) header list and…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "build: keep the umbrella header out of the source_group tree" matches the change. The CMakeLists.txt change removes include/boost/corosio.hpp from the source_group(TREE ...) header list and places it in its own standalone group. The objectives confirm the aim: CMake 4.5 rejects files outside the tree root, so the umbrella header is excluded from the TREE group while staying in the target. The title is concise, specific, and uses a conventional prefix.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the header rows,
One umbrella takes its place apart.
The tree holds all the others now,
CMake sorts each file with care,
Then hops away beneath the moon.

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between db6bd60 and 6973730.

Files selected for processing: 1

  • CMakeLists.txt

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@cppalliance-bot

Copy link
Copy Markdown

An automated preview of the documentation is available at https://427.corosio.prtest3.cppalliance.org/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2026-11-19 16:53:56 UTC

@cppalliance-bot

Copy link
Copy Markdown

GCOVR code coverage report https://427.corosio.prtest3.cppalliance.org/gcovr/index.html
LCOV code coverage report https://427.corosio.prtest3.cppalliance.org/genhtml/index.html
Coverage Diff Report https://427.corosio.prtest3.cppalliance.org/diff-report/index.html

Build time: 2026-11-19 17:09:24 UTC

@sgerbino
sgerbino merged commit 5ca4579 into cppalliance:develop Nov 19, 2026
82 of 84 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Beast2 Nov 19, 2026
@sgerbino
sgerbino deleted the pr/cmake-source-group-umbrella branch November 19, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants