clear mpicc and friends before each build (#17450)

* clear mpi env vars
This commit is contained in:
Sajid Ali 2020-07-09 16:14:49 -05:00 committed by Gregory Becker
parent 1741279f16
commit 5e5cc99147

View file

@ -174,6 +174,14 @@ def clean_environment():
for v in build_system_vars: for v in build_system_vars:
env.unset(v) env.unset(v)
# Unset mpi environment vars. These flags should only be set by
# mpi providers for packages with mpi dependencies
mpi_vars = [
'MPICC', 'MPICXX', 'MPIFC', 'MPIF77', 'MPIF90'
]
for v in mpi_vars:
env.unset(v)
build_lang = spack.config.get('config:build_language') build_lang = spack.config.get('config:build_language')
if build_lang: if build_lang:
# Override language-related variables. This can be used to force # Override language-related variables. This can be used to force