OpenMPI: sanitize dependent build environment. (#15360)

This commit is contained in:
Sergey Kosukhin 2020-08-23 05:01:41 +02:00 committed by GitHub
parent 9fdb945383
commit b5e78bce06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -367,6 +367,14 @@ def setup_dependent_build_environment(self, env, dependent_spec):
env.set('OMPI_FC', spack_fc)
env.set('OMPI_F77', spack_f77)
# See https://www.open-mpi.org/faq/?category=building#installdirs
for suffix in ['PREFIX', 'EXEC_PREFIX', 'BINDIR', 'SBINDIR',
'LIBEXECDIR', 'DATAROOTDIR', 'DATADIR', 'SYSCONFDIR',
'SHAREDSTATEDIR', 'LOCALSTATEDIR', 'LIBDIR',
'INCLUDEDIR', 'INFODIR', 'MANDIR', 'PKGDATADIR',
'PKGLIBDIR', 'PKGINCLUDEDIR']:
env.unset('OPAL_%s' % suffix)
def setup_dependent_package(self, module, dependent_spec):
self.spec.mpicc = join_path(self.prefix.bin, 'mpicc')
self.spec.mpicxx = join_path(self.prefix.bin, 'mpic++')