Help with CMake, Intel MPI, and GNU Fortran

Thanks for the detailed report. I think your MPI_Fortran_COMPILER setting is being used but there should not be any difference between mpifc and mpif90 in this use case. The FindMPI module sets environment variables while using the MPI compiler -show option that configure the matching underlying Fortran compiler anyway. mpifc will just forward to mpif90.

FindMPI is flipping the include directory order from that reported by mpif90 -showme:compile. I tracked down the code doing that and opened CMake Issue 20098 for this bug. Please follow that issue for further updates.