Prevent PSolver from inadvertently adding OpenMP or MPI to the build
In cmake/findPsolver.cmake, our CMake scripts would look for MPI and OpenMP regardless of whether they had been requested through the correct Octopus build flags.
If, then, either of these were actually found in the system, they would get added to the build silently
This MR overcomes this issue in two ways:
- It checks, in
cmake/findPsolver.cmakefor the correct variables before doing thefind_packagecall - In the main
CMakeLists.txtit does a sanity check intended to catch this and similar silent adds for these two packages. If the sanity check fails, the configuration process then explicitly errors out before the build even begins