Skip to content

Conversation

ferdymercury
Copy link
Collaborator

@ferdymercury ferdymercury commented Apr 15, 2025

This Pull request:

Changes or fixes:

Gives a taste on how it would look like to properly add HEADERS to targets in CMake.

This does not just help with the IDE workflow, it gives an idea on future paths:

One could make them PUBLIC instead of PRIVATE, then you would not need the target_include_directories line, and installing and cpacking would be easier.

Related:

Checklist:

  • tested changes locally
  • updated the docs (if necessary)

This PR fixes #

Copy link

github-actions bot commented Apr 15, 2025

Test Results

    20 files      20 suites   3d 7h 5m 6s ⏱️
 3 066 tests  3 066 ✅ 0 💤 0 ❌
59 725 runs  59 725 ✅ 0 💤 0 ❌

Results for commit 347cde1.

♻️ This comment has been updated with latest results.

@pcanal
Copy link
Member

pcanal commented Apr 16, 2025

Also potentially related: #17607

@ferdymercury ferdymercury added this to the 6.38.00 milestone Apr 22, 2025
@dpiparo dpiparo closed this Jun 29, 2025
@dpiparo dpiparo reopened this Jun 29, 2025
@ferdymercury ferdymercury marked this pull request as ready for review July 16, 2025 09:04
@ferdymercury ferdymercury requested a review from bellenot as a code owner July 16, 2025 09:04
@ferdymercury ferdymercury requested a review from hageboeck July 16, 2025 09:04
Copy link
Member

@hageboeck hageboeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ferdymercury, would you agree that the same can be achieved with less code, since CMake already does the expansion to absolute paths for us?

as suggested by hageboeck
@ferdymercury
Copy link
Collaborator Author

Simplification done!

Btw this is the result in the GUI / IDE after this change:

image

Unfolded:

image

@ferdymercury ferdymercury changed the title [RFC] [cmake] Add core/base headers to target HEADERS file_set [cmake] Add core/base headers to target HEADERS file_set Jul 18, 2025
ferdymercury added a commit to ferdymercury/root that referenced this pull request Sep 22, 2025
This version of CMake was released in March 2022
https://github.com/Kitware/CMake/releases/tag/v3.23.0

This version is required to use FILE_SETs, which could help towards root-project#16327 and root-project#18419.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants