mpich based providers : shortened filter_compilers

This commit is contained in:
Massimiliano Culpo 2016-06-15 21:37:12 +02:00
parent b09bee8158
commit daa46105a7
2 changed files with 9 additions and 32 deletions

View File

@ -106,22 +106,13 @@ def filter_compilers(self):
mpif77 = join_path(bin, 'mpif77')
mpif90 = join_path(bin, 'mpif90')
spack_cc = env['CC']
spack_cxx = env['CXX']
spack_f77 = env['F77']
spack_fc = env['FC']
# Substitute Spack compile wrappers for the real
# underlying compiler
kwargs = {'ignore_absent': True, 'backup': False, 'string': True}
filter_file('CC="%s"' % spack_cc,
'CC="%s"' % self.compiler.cc, mpicc, **kwargs)
filter_file('CXX="%s"' % spack_cxx,
'CXX="%s"' % self.compiler.cxx, mpicxx, **kwargs)
filter_file('F77="%s"' % spack_f77,
'F77="%s"' % self.compiler.f77, mpif77, **kwargs)
filter_file('FC="%s"' % spack_fc,
'FC="%s"' % self.compiler.fc, mpif90, **kwargs)
filter_file(env['CC'], self.compiler.cc, mpicc, **kwargs)
filter_file(env['CXX'], self.compiler.cxx, mpicxx, **kwargs)
filter_file(env['F77'], self.compiler.f77, mpif77, **kwargs)
filter_file(env['FC'], self.compiler.fc, mpif90, **kwargs)
# Remove this linking flag if present
# (it turns RPATH into RUNPATH)

View File

@ -249,27 +249,13 @@ def filter_compilers(self):
mpif77 = join_path(bin, 'mpif77')
mpif90 = join_path(bin, 'mpif90')
spack_cc = env['CC']
spack_cxx = env['CXX']
spack_f77 = env['F77']
spack_fc = env['FC']
kwargs = {
'ignore_absent': True,
'backup': False,
'string': True
}
# Substitute Spack compile wrappers for the real
# underlying compiler
filter_file('CC="%s"' % spack_cc,
'CC="%s"' % self.compiler.cc, mpicc, **kwargs)
filter_file('CXX="%s"' % spack_cxx,
'CXX="%s"' % self.compiler.cxx, mpicxx, **kwargs)
filter_file('F77="%s"' % spack_f77,
'F77="%s"' % self.compiler.f77, mpif77, **kwargs)
filter_file('FC="%s"' % spack_fc,
'FC="%s"' % self.compiler.fc, mpif90, **kwargs)
kwargs = {'ignore_absent': True, 'backup': False, 'string': True}
filter_file(env['CC'], self.compiler.cc, mpicc, **kwargs)
filter_file(env['CXX'], self.compiler.cxx, mpicxx, **kwargs)
filter_file(env['F77'], self.compiler.f77, mpif77, **kwargs)
filter_file(env['FC'], self.compiler.fc, mpif90, **kwargs)
# Remove this linking flag if present
# (it turns RPATH into RUNPATH)