FindMPI regression between 3.9.6 and 3.10.0 on FreeBSD
Something changed in the FindMPI module between 3.9.6 and 3.10.0, and the newer module cannot find MPI successfully on FreeBSD 10.3.
CMake 3.10
Here's (part of) the output when trying to build math/scalapack (the FreeBSD port / package of the scalable LAPACK suite), with CMake 3.10.0:
-- Finding MPI ..
-- Could NOT find MPI_C (missing: MPI_C_WORKS)
-- Found MPI_Fortran: /usr/local/bin/mpif90 (found version "2.2")
-- Could NOT find MPI (missing: MPI_C_FOUND) (found version "2.2")
-- Finding MPI .. FALSE
-- Found MPI_LIBRARY : FALSE
CMake Error at CMakeLists.txt:76 (message):
--> MPI Library NOT FOUND -- please set MPI_BASE_DIR accordingly --
CMake 3.9
Replacing the FindMPI module shipped with CMake 3.10 by the FindMPI module shipped with 3.9, I get:
-- Finding MPI ..
-- Found MPI_Fortran: /usr/lib/libpthread.so;/usr/lib/libexecinfo.so;/usr/local/lib/libmpichf90.so;/usr/local/lib/libmpich.so;/usr/local/lib/libopa.so;/usr/local/lib/libmpl.so;/usr/lib/libpthread.so
-- Finding MPI .. TRUE
-- Found MPI_LIBRARY : TRUE
-- --> MPI C Compiler : /usr/local/bin/mpicc
-- --> C Compiler : /usr/local/bin/mpicc
-- --> MPI Fortran Compiler : /usr/local/bin/mpif90
-- --> Fortran Compiler : /usr/local/bin/mpif90