Cleanup cmake MPI module
Summary
The old cmake file DuneMPI.cmake mixed two independent steps: find_package(MPI) and add_dune_mpi_flags(). This MR renames this file to AddMPIFlags.cmake following the naming scheme used for several other find packages.
Changes:
- Rename
DuneMPI.cmakeintoAddMPIFlags.cmake - Deprecate the old file
- Move the
find_package(MPI)toDuneCommonMacros - Replace the manual extraction of compile flags and include directories by the imported target
MPI::MPI_C - Do not call the global
include_directoriesfor mpi include path. - Resolve an inconsistency with the MPI flags when used with
enable_all_packagesoradd_dune_mpiflags
Edited by Simon Praetorius