-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[CMake] Avoid unneeded artifacts in the library installation directory #19044
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
Test Results 21 files 21 suites 3d 9h 6m 38s ⏱️ For more details on these failures, see this check. Results for commit c9ddf72. ♻️ This comment has been updated with latest results. |
6950325 to
cebd367
Compare
| install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${byproduct}.pcm DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
| endforeach() | ||
|
|
||
| list(APPEND core_implicit_modules "-mByproduct" "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the semantic of those additions?
cebd367 to
f63bcfc
Compare
f63bcfc to
1286fe7
Compare
| list(APPEND core_implicit_modules "-mByproduct" "ROOT_Foundation_Stage1_NoRTTI") | ||
| list(APPEND core_implicit_modules "-mByproduct" "ROOT_Foundation_C") | ||
| list(APPEND core_implicit_modules "-mByproduct" "ROOT_Rtypes") | ||
| list(APPEND core_implicit_modules "-m" "_Builtin_intrinsics") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it would now be listed twice in core_implicit_modules, i.e. once more inside the new foreach loop.
Explicitly install byproducts of generating Core dictionaries, and put the CMake code right next to where these byproducts are declared. This is better than relying on all `.pcm` files getting installed via some other part of the CMake code.
Explicitly installing the `modules.idx` file is better than copying it by regex when copying the full library output directory.
Explicitly listing all the `pcm` files that otherwise would not get installed seems tedious, but it has one clear advantage over `install(DIRECTORY ...)`. The problem with the latter is that it copies any subdirectories, not matter if the files in it were matched by regex or not. So what happens is that you end up with several empty directories in the install tree, notably the full directory structure of the Python interfaces, in case they are installed to a different directory. One way to fix this is to install the individual pcm files instead, as suggested by this commit.
1286fe7 to
c9ddf72
Compare
Avoid unneeded artifacts in the library installation directory, in particular empty directories if the Python interfaces are installed in a directory other than the library installation directory.
Motivated by:
More detail in the commit description.