[v636][CMake] Set rpath for individual targets and not globally#19518
Merged
guitargeek merged 1 commit intoroot-project:v6-36-00-patchesfrom Aug 4, 2025
Merged
[v636][CMake] Set rpath for individual targets and not globally#19518guitargeek merged 1 commit intoroot-project:v6-36-00-patchesfrom
rpath for individual targets and not globally#19518guitargeek merged 1 commit intoroot-project:v6-36-00-patchesfrom
Conversation
When using the `rpath=ON` option, the global CMake variable `CMAKE_INSTALL_RPATH` is mutated, which is problematic in several corner cases. This commit suggests to append the rpaths at the target property level, and also set the rpaths for the build tree separately so they make sense. A new ROOT macro is introduced for this rpath setting, which are also used for the PyROOT libraries, which also need custom rpaths. Closes root-project#19327 and root-project#19134.
This was referenced Aug 4, 2025
Test Results 18 files 18 suites 2d 20h 50m 39s ⏱️ For more details on these failures, see this check. Results for commit 56f7254. |
892e89c
into
root-project:v6-36-00-patches
20 of 23 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #19501 to fix the build errors on Spack and MacPorts with the next 6.36.04 patch release
When using the
rpath=ONoption, the global CMake variableCMAKE_INSTALL_RPATHis mutated, which is problematic in several corner cases.This commit suggests to append the rpaths at the target property level, and also set the rpaths for the build tree separately so they make sense.
A new ROOT macro is introduced for this rpath setting, which are also used for the PyROOT libraries, which also need custom rpaths.
Closes #19327 and #19134.