From 9aafe21b6328d5944469b7a0933e5a446133f876 Mon Sep 17 00:00:00 2001 From: Pramod S Kumbhar Date: Sun, 17 Sep 2017 14:47:16 +0200 Subject: [PATCH] Filter system paths from CMAKE_PREFIX_PATH (#5385) --- lib/spack/spack/build_systems/cmake.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/spack/spack/build_systems/cmake.py b/lib/spack/spack/build_systems/cmake.py index edc9751c82..5b0f5526c9 100644 --- a/lib/spack/spack/build_systems/cmake.py +++ b/lib/spack/spack/build_systems/cmake.py @@ -29,6 +29,7 @@ import spack.build_environment from llnl.util.filesystem import working_dir, join_path +from spack.util.environment import filter_system_paths from spack.directives import depends_on, variant from spack.package import PackageBase, InstallError, run_after @@ -149,6 +150,7 @@ def _std_args(pkg): # to find immediate link dependencies in right places: deps = [d.prefix for d in pkg.spec.dependencies(deptype=('build', 'link'))] + deps = filter_system_paths(deps) args.append('-DCMAKE_PREFIX_PATH:STRING={0}'.format(';'.join(deps))) return args