Skip to content

[RFC,cmake] A layer of smoke: avoid by using file sets for library generation - #23061

Draft
ferdymercury wants to merge 6 commits into
root-project:masterfrom
ferdymercury:cmakerfc
Draft

ferdymercury wants to merge 6 commits into
root-project:masterfrom
ferdymercury:cmakerfc

Conversation

@ferdymercury

@ferdymercury ferdymercury commented Aug 10, 2026 •

Copy link
Copy Markdown
Collaborator

This Pull request:

Changes or fixes:

Note: this PR is totally experimental.

ROOT CMake macros are often... "a layer of smoke", masking common things such as PUBLIC and PRIVATE with ambiguous names such as DEPENDENCIES and LIBRARIES. No outside user (and often not inside ones) will know what they mean unless looking carefully in the instructions.

With CMake FILE_SETs, some macro stuff can be replaced with more standard CMake terminology. Clear advantage: an outside user with CMake knowledge will immediately know what you are doing no matter if it's the first time they look into ROOT. Otherwise, you need to dive in into a lot of cryptic macro layers...

This is an ongoing draft, it specifies more the structure /philosophy rather than being fully functional. For discussion and sandbox experiments, a few libraries were chosen. Not all tests are passing.

See also discussion in #20533 (comment)

@ferdymercury ferdymercury added the skip ci Skip the full builds on the actions runners label Aug 10, 2026
@ferdymercury ferdymercury changed the title [experimental,RF] A layer of smoke: avoid by using file sets for library generation [RFC,cmake] A layer of smoke: avoid by using file sets for library generation Aug 10, 2026
@github-actions

github-actions Bot commented Aug 10, 2026 •

Copy link
Copy Markdown

Test Results

    21 files      21 suites   3d 7h 4m 44s ⏱️
 3 884 tests  3 882 ✅ 0 💤 2 ❌
72 202 runs  72 196 ✅ 0 💤 6 ❌

For more details on these failures, see this check.

Results for commit 991804a.

♻️ This comment has been updated with latest results.

@ferdymercury ferdymercury added this to the 6.46/7.00 milestone Sep 15, 2026
@ferdymercury
ferdymercury force-pushed the cmakerfc branch 2 times, most recently from 3f70b76 to 72eff9c Compare November 4, 2026 08:25
@ferdymercury ferdymercury removed the skip ci Skip the full builds on the actions runners label Nov 5, 2026
@ferdymercury ferdymercury removed this from the 7.00.00-rc1 milestone Nov 5, 2026
@ferdymercury ferdymercury added the skip code analysis Skip the code analysis CI steps for this PR, including verifying clang-formatting and running Ruff. label Nov 5, 2026
@ferdymercury

Copy link
Copy Markdown
Collaborator Author

@guitargeek before I start with other targets, do you prefer the compact FILE_SET layout or the original one where each thing is in its own line?

@guitargeek

Copy link
Copy Markdown
Contributor

I prefer the tighter new layout. I guess you too, since you suggested to change to it?

Question: do you intend your new functions to be public for ROOT users who integrate ROOT in their projects (see https://root.cern/manual/integrate_root_into_my_cmake_project/)?

We have to be a bit more careful with RootMacros actually, because it's also implicitly included when you find ROOT via CMake: https://github.com/root-project/root/blob/master/cmake/scripts/ROOTConfig.cmake.in#L81

So we have to kind of treat RootMacros.cmake as public, and I'd like to split it up eventually into a public and a private part

trying to fix

2026-11-05T12:36:40.6393830Z Warning in <CheckModuleValid>: after creating module "RooFitXRooFit" the following headers are not part of that module:
2026-11-05T12:36:40.7063250Z /Users/sftnight/ROOT-CI/build/include/ROOT.modulemap:2953:46: error: cannot emit module RooFitXRooFit: size must be explicitly specified for missing header file "RooFit/xRooFit/xRooFit.h"
2026-11-05T12:36:40.7063940Z   module "RooFit/xRooFit/xRooFit.h" { header "RooFit/xRooFit/xRooFit.h" export * }
2026-11-05T12:36:40.7064260Z                                              ^
2026-11-05T12:36:40.7064810Z /Users/sftnight/ROOT-CI/build/include/ROOT.modulemap:2954:47: error: cannot emit module RooFitXRooFit: size must be explicitly specified for missing header file "RooFit/xRooFit/xRooNode.h"
2026-11-05T12:36:40.7065490Z   module "RooFit/xRooFit/xRooNode.h" { header "RooFit/xRooFit/xRooNode.h" export * }
@ferdymercury

ferdymercury commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator Author

do you intend your new functions to be public for ROOT users who integrate ROOT

As you prefer, no strong opinion on that.

In any case I have implemented everything as new functions to be backward compatible.

I have also roofitcore converted, but I will not push the commit yet to easen getting an impression on a smaller diff. Unless you prefer it already now.

@ferdymercury

Copy link
Copy Markdown
Collaborator Author

I have also roofitcore converted

In here: #24038 also with TMVA

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-Assisted skip code analysis Skip the code analysis CI steps for this PR, including verifying clang-formatting and running Ruff.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants