summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorTomoki, Karatsu <49965247+t-karatsu@users.noreply.github.com>2020-06-29 15:06:09 +0900
committerGitHub <noreply@github.com>2020-06-29 08:06:09 +0200
commit4425e837501df1c640a173f70c83327d76d64d6b (patch)
tree79758d2e7613627f9f9b508a014d55bf9e50b4b1 /var
parent77351bd2872c5d92bae312042f44cdcb3ec2acdf (diff)
downloadspack-4425e837501df1c640a173f70c83327d76d64d6b.tar.gz
spack-4425e837501df1c640a173f70c83327d76d64d6b.tar.bz2
spack-4425e837501df1c640a173f70c83327d76d64d6b.tar.xz
spack-4425e837501df1c640a173f70c83327d76d64d6b.zip
fujitsu-mpi: added "headers" and "libs" methods (#17253)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/fujitsu-mpi/package.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/fujitsu-mpi/package.py b/var/spack/repos/builtin/packages/fujitsu-mpi/package.py
index fcf4dc8e94..3a4fa40975 100644
--- a/var/spack/repos/builtin/packages/fujitsu-mpi/package.py
+++ b/var/spack/repos/builtin/packages/fujitsu-mpi/package.py
@@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
+import os
class FujitsuMpi(Package):
@@ -28,6 +29,24 @@ class FujitsuMpi(Package):
raise InstallError(
'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):
self.spec.mpicc = self.prefix.bin.mpifcc
self.spec.mpicxx = self.prefix.bin.mpiFCC