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.
This commit is contained in:
parent
836f40e30f
commit
0e22a94f81
@ -47,6 +47,10 @@ class Eigen(CMakePackage):
|
|||||||
|
|
||||||
patch('find-ptscotch.patch', when='@3.3.4')
|
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
|
@property
|
||||||
def headers(self):
|
def headers(self):
|
||||||
headers = find_all_headers(self.prefix.include)
|
headers = find_all_headers(self.prefix.include)
|
||||||
|
Loading…
Reference in New Issue
Block a user