-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[core] Add core headers to private CMake target FILE_SETS #20515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
This is a non-functional change, it only improves the IDE experience. In the future, we could avoid copying headers to build-directory and verbose target_include_directory statements by just using the file_sets. Same with INSTALL, would go through headers. This could ultimately go into the ROOT custom macros, but for the moment let's only do the minimal changes for the IDE and let the rest for later.
|
Hi! Can this not be part of the |
Not without a major rework of that macro as well as other macro such as ROOT_OBJECT_LIBRARY, since we have to specify separately DICT_HEADERS vs public headers not in dict vs private headers. Then we would also need to specify the base directory of each group of headers (inc, res)... In my opinion, it would make sense to first add all HEADERS verbosely, which is easy and modular, and one does not risk to break everything, to improve IDE experience in a short time frame. To me, it only makes sense to touch the macros at the same time than the copy-header-to-build-dir is removed by using file-sets instead. But that's a major cleanup of the CMake build system. Also, there are several places were headers are not explicitly stated but globbed/searched for in inc-dir, so this fixes that too. |
|
Hi @ferdymercury, sorry for not reading your initial post carefully enough! I think even if we can't integrate the it in the existing macros like What do you think? |
|
Thanks @guitargeek
I guess the answer depends on whether #19941 is going to get merged for 6.40 or for later. If we want to stay with CMake 3.22 for ROOT 6.40, then yes, it makes total sense to have Side note: one could even think the other way round for the future. CMake target_sources defines four types of FILE_SETS
Then, ROOT_STL_PACKAGE would look for Target.LinkDefFileSet Target.DictHeaders rather than passing all the headers again to ROOT_STL_PACKAGE as argument. |
Test Results 18 files 18 suites 3d 4h 18m 47s ⏱️ For more details on these failures, see this check. Results for commit fba4acf. |
This is a non-functional change, it only improves the IDE experience.
In the future, we could avoid copying headers to build-directory and verbose target_include_directory statements by just using the file_sets. Same with INSTALL, would go through headers.
This could ultimately go into the ROOT custom macros, but for the moment let's only do the minimal changes for the IDE and let the rest for later.
They are all added as private now, in the future we can distinguish private from public file-sets.
As well as DICT_HEADERS for dictionary generation. This might enhance dependency issues and build speed.
Follow-up of #18419