[cmake][mpi] Use correct guard MPI
The dune CMake configuration actually needs MPI_C_FOUND
to be true. If this is true HAVE_MPI
is set (see https://gitlab.dune-project.org/core/dune-common/-/blob/master/cmake/modules/DuneMPI.cmake#L33). This variable is suggested to be used as a replacement for MPI_FOUND
in this MR.
According to the CMake 3.1 doc MPI_FOUND
is actually discouraged and only set for backwards-compatibility with older versions (https://cmake.org/cmake/help/v3.1/module/FindMPI.html). It is reintroduced in newer versions of CMake but is then only true if MPI has been found for all requested languages (whatever "requested languages" means..). Which is also not what we want. Dune seems to only require that MPI_C_FOUND
is set (i.e. the MPI C interface is found).
Edited by Timo Koch