Skip to content

Commit

Permalink
Merge pull request easybuilders#3012 from boegel/CMAKE_SKIP_RPATH
Browse files Browse the repository at this point in the history
only use `-DCMAKE_SKIP_RPATH=ON` for CMake < 3.5.0
  • Loading branch information
bedroge authored Oct 5, 2023
2 parents b2d86f5 + 4e265c2 commit 635a921
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions easybuild/easyblocks/generic/cmakemake.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,10 @@ def configure_step(self, srcdir=None, builddir=None):
self.log.info("Using absolute path to compiler command: %s", value)
options[option] = value

if build_option('rpath'):
if build_option('rpath') and LooseVersion(self.cmake_version) < LooseVersion('3.5.0'):
# instruct CMake not to fiddle with RPATH when --rpath is used, since it will undo stuff on install...
# https://github.com/LLNL/spack/blob/0f6a5cd38538e8969d11bd2167f11060b1f53b43/lib/spack/spack/build_environment.py#L416
# this is only required for CMake < 3.5.0, since newer version are more careful w.r.t. RPATH,
# see https://github.com/Kitware/CMake/commit/3ec9226779776811240bde88a3f173c29aa935b5
options['CMAKE_SKIP_RPATH'] = 'ON'

# show what CMake is doing by default
Expand Down

0 comments on commit 635a921

Please sign in to comment.