FindMPI ignores CMAKE_PREFIX_PATH
I don't know which CMake version this started, but CMAKE_PREFIX_PATH is ignored by FindMPI. MPI_ROOT does work. To quickly reproduce, one might symlink system MPI library and header to /tmp/mympi or so, and then note that CMAKE_PREFIX_PATH has no effect on find_package(MPI)
, one has to set MPI_ROOT
to /tmp/mympi.