diff options
author | Harmen Stoppels <harmenstoppels@gmail.com> | 2022-03-29 18:24:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-29 12:24:10 -0400 |
commit | 9516fa9447c98e5d2a8446f6fd20a8022979d2e4 (patch) | |
tree | 7c07a68622f1b1af0ccba63f52132d3d0fda0f48 /etc | |
parent | c0b400c422832e0078c5687e4765fdda65aed66a (diff) | |
download | spack-9516fa9447c98e5d2a8446f6fd20a8022979d2e4.tar.gz spack-9516fa9447c98e5d2a8446f6fd20a8022979d2e4.tar.bz2 spack-9516fa9447c98e5d2a8446f6fd20a8022979d2e4.tar.xz spack-9516fa9447c98e5d2a8446f6fd20a8022979d2e4.zip |
cmake: use CMAKE_INSTALL_RPATH_USE_LINK_PATH (#29703)
* cmake: use CMAKE_INSTALL_RPATH_USE_LINK_PATH
Spack has a heuristic to add rpaths for packages it knows are required,
but it's really a heuristic, and it does not work when the dependencies
put their libraries in a different folder than `<prefix>/lib{64,}`.
CMake patches binaries after install with the "install rpaths", which by
default are provided by Spack and its heuristic through
`CMAKE_INSTALL_RPATH`.
CMake however knows better what libraries are effectively being linked
to, and has an option to include those in the install rpath too, through
`CMAKE_INSTALL_RPATH_USE_LINK_PATH`.
These two CMake options are complementary, repeated rpaths seem to be
filtered, and the "use link path" paths are appended to Spack's
heuristic "install rpath".
So, it seems like a good idea to enable "use link path" by default, so
that:
- `dlopen` by library name uses Spack's heuristic search paths
- linked libraries in non-standard locations within a prefix get an
rpath thanks to CMake.
* docs
Diffstat (limited to 'etc')
0 files changed, 0 insertions, 0 deletions