Skip to content

Prevent PSolver from inadvertently adding OpenMP or MPI to the build

Jehferson Mello requested to merge jmello/psolver-dont-add-mpi-openmp into main

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:

  1. It checks, in cmake/findPsolver.cmake for the correct variables before doing the find_package call
  2. In the main CMakeLists.txt it 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

Merge request reports

Loading