summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorJeongseok Lee <jslee02@users.noreply.github.com>2019-03-06 18:48:38 -0800
committerPeter Scheibel <scheibel1@llnl.gov>2019-03-06 20:48:38 -0600
commit0e22a94f81f98cf19a1f83ed34226c53c66319ba (patch)
tree10676ee61703358f30d935099d5768189f09fc2d /var
parent836f40e30fc10f7bfba7c493d4f905bfa77028f0 (diff)
downloadspack-0e22a94f81f98cf19a1f83ed34226c53c66319ba.tar.gz
spack-0e22a94f81f98cf19a1f83ed34226c53c66319ba.tar.bz2
spack-0e22a94f81f98cf19a1f83ed34226c53c66319ba.tar.xz
spack-0e22a94f81f98cf19a1f83ed34226c53c66319ba.zip
Eigen package: support Spack-external builds using Eigen (#10751)
Update CPATH in setup_environment for Eigen, so that the Spack-generated module for Eigen will help builds outside of Spack use the appropriate include prefix for Eigen headers (<install_prefix>/include/eigen3/ rather than <install_prefix>/include/) Note that this only updates the run-time environment, rather than the build-time environment, so Spack builds depending on Eigen that use pkgconfig will not be confused by the presence of the Eigen include directory in CPATH.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/eigen/package.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/eigen/package.py b/var/spack/repos/builtin/packages/eigen/package.py
index e3b7c151a7..7d2a591140 100644
--- a/var/spack/repos/builtin/packages/eigen/package.py
+++ b/var/spack/repos/builtin/packages/eigen/package.py
@@ -47,6 +47,10 @@ class Eigen(CMakePackage):
patch('find-ptscotch.patch', when='@3.3.4')
+ def setup_environment(self, spack_env, run_env):
+ run_env.prepend_path('CPATH',
+ join_path(self.prefix, 'include', 'eigen3'))
+
@property
def headers(self):
headers = find_all_headers(self.prefix.include)