FindMPI.cmake malfunctions in the VTK project
The VTK project calls find_package(MPI) from here. Both mpich and openmpi are installed. MPI_HOME is set to /usr/local/mpi/openmpi (mpich is installed in /usr/local)
FindMPI.cmake prints that it has selected mpich (!!!):
-- Found MPI_C: /usr/local/lib/libmpi.so (found version "3.1")
-- Found MPI: TRUE (found version "3.1") found components: C
But at the same time it sets variables to point to openmpi: MPI_C_COMPILER_INCLUDE_DIRS:STRING=/usr/local/mpi/openmpi/include
, MPI_C_LINK_FLAGS:STRING=-Wl,-rpath=-Wl,-rpath=/usr/local/lib/gcc11 -Wl,-rpath -Wl,/usr/local/mpi/openmpi/lib -Wl,--enable-new-dtags -L/usr/local/mpi/openmpi/lib -pthread
.
This doesn't happen in a standalone example.
cmake-core-3.24.0
OS: FreeBSD 13.1
Edited by yurivict