cached_cmake: mpifc is not always defined (#46861)

* cached_cmake: mpifc is not always defined
* mpich: only depend on fortran when +fortran
This commit is contained in:
Richard Berger
2024-11-18 15:49:56 -07:00
committed by GitHub
parent c8e4ae08da
commit 73316c3e28
2 changed files with 5 additions and 2 deletions

View File

@@ -192,7 +192,10 @@ def initconfig_mpi_entries(self):
entries.append(cmake_cache_path("MPI_C_COMPILER", spec["mpi"].mpicc))
entries.append(cmake_cache_path("MPI_CXX_COMPILER", spec["mpi"].mpicxx))
entries.append(cmake_cache_path("MPI_Fortran_COMPILER", spec["mpi"].mpifc))
# not all MPIs have Fortran wrappers
if hasattr(spec["mpi"], "mpifc"):
entries.append(cmake_cache_path("MPI_Fortran_COMPILER", spec["mpi"].mpifc))
# Check for slurm
using_slurm = False