summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Beckingsale <davidbeckingsale@gmail.com>2014-08-22 13:52:30 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2014-08-22 14:45:44 -0700
commit42ca6c8bfc2b7598acd880a013f7898db5245004 (patch)
treee527ad52f7d4d190e8f2d5244255f16ea2912129
parentd87a6525823e0d75b9f6b71fb265ebffb9c060a4 (diff)
downloadspack-42ca6c8bfc2b7598acd880a013f7898db5245004.tar.gz
spack-42ca6c8bfc2b7598acd880a013f7898db5245004.tar.bz2
spack-42ca6c8bfc2b7598acd880a013f7898db5245004.tar.xz
spack-42ca6c8bfc2b7598acd880a013f7898db5245004.zip
Add dependency prefixes to CMAKE_PREFIX_PATH
-rw-r--r--lib/spack/spack/build_environment.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py
index 38d5f70282..ec946cd2d7 100644
--- a/lib/spack/spack/build_environment.py
+++ b/lib/spack/spack/build_environment.py
@@ -143,6 +143,10 @@ def set_build_environment_variables(pkg):
os.environ[SPACK_SPEC] = str(pkg.spec)
os.environ[SPACK_DEBUG_LOG_DIR] = spack.spack_working_dir
+ # Add dependencies to CMAKE_PREFIX_PATH
+ dep_prefixes = [d.package.prefix for d in pkg.spec.dependencies.values()]
+ path_set("CMAKE_PREFIX_PATH", dep_prefixes)
+
def set_module_variables_for_package(pkg):
"""Populate the module scope of install() with some useful functions.