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.
This commit is contained in:
parent
3cf2cda4ec
commit
e4597f09be
1 changed files with 7 additions and 0 deletions
|
@ -220,6 +220,13 @@ def url_for_version(self, version):
|
||||||
url = "http://www.open-mpi.org/software/ompi/v{0}/downloads/openmpi-{1}.tar.bz2"
|
url = "http://www.open-mpi.org/software/ompi/v{0}/downloads/openmpi-{1}.tar.bz2"
|
||||||
return url.format(version.up_to(2), version)
|
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
|
@property
|
||||||
def libs(self):
|
def libs(self):
|
||||||
query_parameters = self.spec.last_query.extra_parameters
|
query_parameters = self.spec.last_query.extra_parameters
|
||||||
|
|
Loading…
Reference in a new issue