fujitsu-mpi: added "headers" and "libs" methods (#17253)
This commit is contained in:
parent
77351bd287
commit
4425e83750
@ -4,6 +4,7 @@
|
|||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
from spack import *
|
from spack import *
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
class FujitsuMpi(Package):
|
class FujitsuMpi(Package):
|
||||||
@ -28,6 +29,24 @@ def install(self, spec, prefix):
|
|||||||
raise InstallError(
|
raise InstallError(
|
||||||
'Fujitsu MPI is not installable; it is vendor supplied')
|
'Fujitsu MPI is not installable; it is vendor supplied')
|
||||||
|
|
||||||
|
@property
|
||||||
|
def headers(self):
|
||||||
|
hdrs = find_headers('mpi', self.prefix.include, recursive=True)
|
||||||
|
hdrs.directories = os.path.dirname(hdrs[0])
|
||||||
|
return hdrs or None
|
||||||
|
|
||||||
|
@property
|
||||||
|
def libs(self):
|
||||||
|
query_parameters = self.spec.last_query.extra_parameters
|
||||||
|
libraries = ['libmpi']
|
||||||
|
|
||||||
|
if 'cxx' in query_parameters:
|
||||||
|
libraries = ['libmpi_cxx'] + libraries
|
||||||
|
|
||||||
|
return find_libraries(
|
||||||
|
libraries, root=self.prefix, shared=True, recursive=True
|
||||||
|
)
|
||||||
|
|
||||||
def setup_dependent_package(self, module, dependent_spec):
|
def setup_dependent_package(self, module, dependent_spec):
|
||||||
self.spec.mpicc = self.prefix.bin.mpifcc
|
self.spec.mpicc = self.prefix.bin.mpifcc
|
||||||
self.spec.mpicxx = self.prefix.bin.mpiFCC
|
self.spec.mpicxx = self.prefix.bin.mpiFCC
|
||||||
|
Loading…
Reference in New Issue
Block a user