summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2022-05-09 07:40:10 -0400
committerGitHub <noreply@github.com>2022-05-09 13:40:10 +0200
commitd08520cb15c059142d88af637e86de3b9855974d (patch)
treec88f6430734d8e20b28ca27ce1d5e9c197138db5 /var
parent5397dcee517de37652d5fc7b15c150d5bd00176b (diff)
downloadspack-d08520cb15c059142d88af637e86de3b9855974d.tar.gz
spack-d08520cb15c059142d88af637e86de3b9855974d.tar.bz2
spack-d08520cb15c059142d88af637e86de3b9855974d.tar.xz
spack-d08520cb15c059142d88af637e86de3b9855974d.zip
mpitrampoline: Correct build environment (#30549)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/mpitrampoline/package.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/var/spack/repos/builtin/packages/mpitrampoline/package.py b/var/spack/repos/builtin/packages/mpitrampoline/package.py
index e0148908f3..e2a74e6657 100644
--- a/var/spack/repos/builtin/packages/mpitrampoline/package.py
+++ b/var/spack/repos/builtin/packages/mpitrampoline/package.py
@@ -65,16 +65,6 @@ class Mpitrampoline(CMakePackage):
libraries = ['libmpitrampoline']
return find_libraries(libraries, root=self.prefix.lib, shared=True)
- def setup_build_environment(self, env):
- fflags = ['-fcray-pointer']
- if self.spec.satisfies('%apple-clang@11:'):
- fflags.append('-fallow-argument-mismatch')
- if self.spec.satisfies('%clang@11:'):
- fflags.append('-fallow-argument-mismatch')
- if self.spec.satisfies('%gcc@10:'):
- fflags.append('-fallow-argument-mismatch')
- env.set('FFLAGS', ' '.join(fflags))
-
def setup_run_environment(self, env):
# Because MPI implementations provide compilers, they have to add to
# their run environments the code to make the compilers available.
@@ -92,6 +82,16 @@ class Mpitrampoline(CMakePackage):
env.set('MPITRAMPOLINE_CC', spack_cc)
env.set('MPITRAMPOLINE_CXX', spack_cxx)
env.set('MPITRAMPOLINE_FC', spack_fc)
+ fflags = []
+ if (self.spec.satisfies('%apple-clang') or
+ self.spec.satisfies('%clang') or
+ self.spec.satisfies('%gcc')):
+ fflags.append('-fcray-pointer')
+ if (self.spec.satisfies('%apple-clang@11:') or
+ self.spec.satisfies('%clang@11:') or
+ self.spec.satisfies('%gcc@10:')):
+ fflags.append('-fallow-argument-mismatch')
+ env.set('FFLAGS', ' '.join(fflags))
def setup_dependent_package(self, module, dependent_spec):
self.spec.mpicc = join_path(self.prefix.bin, 'mpicc')