mpitrampoline: Correct build environment (#30549)
This commit is contained in:
parent
5397dcee51
commit
d08520cb15
@ -65,16 +65,6 @@ def libs(self):
|
|||||||
libraries = ['libmpitrampoline']
|
libraries = ['libmpitrampoline']
|
||||||
return find_libraries(libraries, root=self.prefix.lib, shared=True)
|
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):
|
def setup_run_environment(self, env):
|
||||||
# Because MPI implementations provide compilers, they have to add to
|
# Because MPI implementations provide compilers, they have to add to
|
||||||
# their run environments the code to make the compilers available.
|
# their run environments the code to make the compilers available.
|
||||||
@ -92,6 +82,16 @@ def setup_dependent_build_environment(self, env, dependent_spec):
|
|||||||
env.set('MPITRAMPOLINE_CC', spack_cc)
|
env.set('MPITRAMPOLINE_CC', spack_cc)
|
||||||
env.set('MPITRAMPOLINE_CXX', spack_cxx)
|
env.set('MPITRAMPOLINE_CXX', spack_cxx)
|
||||||
env.set('MPITRAMPOLINE_FC', spack_fc)
|
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):
|
def setup_dependent_package(self, module, dependent_spec):
|
||||||
self.spec.mpicc = join_path(self.prefix.bin, 'mpicc')
|
self.spec.mpicc = join_path(self.prefix.bin, 'mpicc')
|
||||||
|
Loading…
Reference in New Issue
Block a user