cmake: modify FindMPI.cmake to treat Fujitsu MPI correctly (#16864)
This commit is contained in:
parent
8be7823cc5
commit
c3be6d903a
@ -238,3 +238,9 @@ def test(self):
|
|||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
make('install')
|
make('install')
|
||||||
|
|
||||||
|
if spec.satisfies('%fj'):
|
||||||
|
for f in find(self.prefix, 'FindMPI.cmake', recursive=True):
|
||||||
|
filter_file('mpcc_r)', 'mpcc_r mpifcc)', f, string=True)
|
||||||
|
filter_file('mpc++_r)', 'mpc++_r mpiFCC)', f, string=True)
|
||||||
|
filter_file('mpifc)', 'mpifc mpifrt)', f, string=True)
|
||||||
|
@ -82,15 +82,6 @@ def cmake_args(self):
|
|||||||
"-DCMAKE_Fortran_FLAGS=%s" % self.compiler.fc_pic_flag
|
"-DCMAKE_Fortran_FLAGS=%s" % self.compiler.fc_pic_flag
|
||||||
])
|
])
|
||||||
|
|
||||||
# Specify Fujitsu-MPI's location
|
|
||||||
if spec.satisfies('%fj') and '^fujitsu-mpi' in spec:
|
|
||||||
options.extend([
|
|
||||||
'-DMPI_C_COMPILER=%s' % spec['mpi'].mpicc,
|
|
||||||
'-DMPI_CXX_COMPILER=%s' % spec['mpi'].mpicxx,
|
|
||||||
'-DMPI_Fortran_COMPILER=%s' % spec['mpi'].mpifc,
|
|
||||||
'-DMPI_BASE_DIR=%s' % spec['mpi'].prefix
|
|
||||||
])
|
|
||||||
|
|
||||||
return options
|
return options
|
||||||
|
|
||||||
@run_after('install')
|
@run_after('install')
|
||||||
|
Loading…
Reference in New Issue
Block a user