[CMake] Build rootcint and genreflex as separate targets#19769
[CMake] Build rootcint and genreflex as separate targets#19769guitargeek merged 1 commit intoroot-project:masterfrom
rootcint and genreflex as separate targets#19769Conversation
e6d39c4 to
9bc5328
Compare
rootcint and genreflex as copies of rootclingrootcint and genreflex as separate targets
9bc5328 to
0da49b0
Compare
|
To hide whitespace changes for easier review: |
Side note: We do not support static library builds but we have had request for it, this would (silently) make them [avoidably] (even) bigger. |
I assume this is solvable by ... setting it :) (and/or handling the case more explicitly). So the bigger hurdle is:
Where/when are hard links not allowed? |
|
Also Python wheels (I can look up the source again when on the computer) |
Test Results 22 files 22 suites 3d 18h 28m 50s ⏱️ For more details on these failures, see this check. Results for commit 75b852c. ♻️ This comment has been updated with latest results. |
This makes the CMake code more robust.
Right now, we use some `install(CODE "execute_process(COMMAND ln -f ...`
solution on unix to install `rootcint` and `genreflex`. This does not
work in all cases, either because of the usage of `\$ENV{DESTDIR}` when
`DESTDIR` is not set, or because hard links are not allowed.
Always copying `rootcling` - already in the build tree - would avoid
that problem, but by copying we risk sidestepping the CMake mechanisms
to set the RPath correctly when installing the copies, which are not
actual targets.
To make makes things simpler and more robust, this commit suggests to
build the `rootcing` and `genreflex` executables as separate targets
from the same source. The cost is very little cost in memory
(`rootcling` is only 31K, so copying two times only increases the size
of ROOTs `bin` directory by 1.5 %) and little in compile time (the extra
compile time is less than a second, not noticable in parallel builds).
0da49b0 to
75b852c
Compare
We are far from this anyway. Progress on static builds is tracked in this issue now: If we have to provide static builds, the situation with the ROOT executables can be revisited. |
This makes the CMake code more robust.
Right now, we use some
install(CODE "execute_process(COMMAND ln -f ...solution on unix to install
rootcintandgenreflex. This does notwork in all cases, either because of the usage of
\$ENV{DESTDIR}whenDESTDIRis not set, or because hard links are not allowed.Always copying
rootcling- already in the build tree - would avoidthat problem, but by copying we risk sidestepping the CMake mechanisms
to set the RPath correctly when installing the copies, which are not
actual targets.
To make makes things simpler and more robust, this commit suggests to
build the
rootcingandgenreflexexecutables as separate targetsfrom the same source. The cost is very little cost in memory
(
rootclingis only 31K, so copying two times only increases the sizeof ROOTs
bindirectory by 1.5 %) and little in compile time (the extracompile time is less than a second, not noticable in parallel builds).