diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2015-02-17 00:49:52 -0800 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2015-02-17 00:49:52 -0800 |
commit | 17ac609d2399af891c4aa85c09585ed8eadf06ff (patch) | |
tree | 587f8c702e431189df5a2ba725dd2339824a8587 /lib | |
parent | 724b72bdaf5c7c569e502e383e2aadcb8105983c (diff) | |
parent | 0c94a6e2b0fb6b7b8f1fd78f6bb56ea9f5bf3d85 (diff) | |
download | spack-17ac609d2399af891c4aa85c09585ed8eadf06ff.tar.gz spack-17ac609d2399af891c4aa85c09585ed8eadf06ff.tar.bz2 spack-17ac609d2399af891c4aa85c09585ed8eadf06ff.tar.xz spack-17ac609d2399af891c4aa85c09585ed8eadf06ff.zip |
Merge branch 'features/memaxes' into develop
Conflicts:
var/spack/packages/libpng/package.py
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/build_environment.py | 14 | ||||
-rw-r--r-- | lib/spack/spack/cmd/location.py | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 84d2bd77ef..59b25d96e7 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -184,6 +184,10 @@ def set_module_variables_for_package(pkg): if platform.mac_ver()[0]: m.std_cmake_args.append('-DCMAKE_FIND_FRAMEWORK=LAST') + # Set up CMake rpath + m.std_cmake_args.append('-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE') + m.std_cmake_args.append('-DCMAKE_INSTALL_RPATH=%s' % ":".join(get_rpaths(pkg))) + # Emulate some shell commands for convenience m.pwd = os.getcwd m.cd = os.chdir @@ -203,6 +207,16 @@ def set_module_variables_for_package(pkg): m.prefix = pkg.prefix +def get_rpaths(pkg): + """Get a list of all the rpaths for a package.""" + rpaths = [pkg.prefix.lib, pkg.prefix.lib64] + rpaths.extend(d.prefix.lib for d in pkg.spec.traverse(root=False) + if os.path.isdir(d.prefix.lib)) + rpaths.extend(d.prefix.lib64 for d in pkg.spec.traverse(root=False) + if os.path.isdir(d.prefix.lib64)) + return rpaths + + def setup_package(pkg): """Execute all environment setup routines.""" set_compiler_environment_variables(pkg) diff --git a/lib/spack/spack/cmd/location.py b/lib/spack/spack/cmd/location.py index 810c34d0a6..709e894b7f 100644 --- a/lib/spack/spack/cmd/location.py +++ b/lib/spack/spack/cmd/location.py @@ -23,6 +23,7 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## import os +import sys from external import argparse import llnl.util.tty as tty |