summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVeselin Dobrev <v-dobrev@users.noreply.github.com>2018-03-05 11:53:36 -0800
committerChristoph Junghans <christoph.junghans@gmail.com>2018-03-05 12:53:36 -0700
commite4597f09bef4436e99cd63e2510e07e4c91bc821 (patch)
tree9dde3e32ecd5db5122ea660a4e873350f56ae17b
parent3cf2cda4ec21144e5b388408eee5c648c1f5b91d (diff)
downloadspack-e4597f09bef4436e99cd63e2510e07e4c91bc821.tar.gz
spack-e4597f09bef4436e99cd63e2510e07e4c91bc821.tar.bz2
spack-e4597f09bef4436e99cd63e2510e07e4c91bc821.tar.xz
spack-e4597f09bef4436e99cd63e2510e07e4c91bc821.zip
openmpi: add package-specific 'headers' property (#7267)
* [OpenMPI] Add the 'headers' property. This removes some redundant headers from sub-directories, returned by the default '.headers' handler. * [OpenMPI] In the .headers property, add a fallback to search all of prefix for the mpi.h header. Recommended by @junghans to support some external configurations, see #7268.
-rw-r--r--var/spack/repos/builtin/packages/openmpi/package.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py
index 5d845e84af..e14c6174ba 100644
--- a/var/spack/repos/builtin/packages/openmpi/package.py
+++ b/var/spack/repos/builtin/packages/openmpi/package.py
@@ -221,6 +221,13 @@ class Openmpi(AutotoolsPackage):
return url.format(version.up_to(2), version)
@property
+ def headers(self):
+ hdrs = HeaderList(find(self.prefix.include, 'mpi.h', recursive=False))
+ if not hdrs:
+ hdrs = HeaderList(find(self.prefix, 'mpi.h', recursive=True))
+ return hdrs or None
+
+ @property
def libs(self):
query_parameters = self.spec.last_query.extra_parameters
libraries = ['libmpi']