[CMake] FindMPI.cmake
Allen D Byrne
byrn at hdfgroup.org
Thu Nov 3 17:00:55 EDT 2011
I have finally successfully compiled our library and tests on Win7 with mpich2. However I had to make the following changes in FindMPI.cmake starting at line 409. I added the fortran block and removed the quotes from the set(MPI_LIBRARIES_WORK ...) commands. The qoutes really messed up VS linking on windows! Any concerns?
if (${lang} STREQUAL CXX)
set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE)
find_library(MPI_LIB
NAMES mpi++ mpicxx cxx mpi_cxx
HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH}
PATH_SUFFIXES lib)
if (MPI_LIBRARIES_WORK AND MPI_LIB)
set(MPI_LIBRARIES_WORK ${MPI_LIBRARIES_WORK} ${MPI_LIB})
endif()
endif()
if (${lang} STREQUAL Fortran)
set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE)
find_library(MPI_LIB
NAMES fmpi fmpich fmpich2 fmpich2g
HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH}
PATH_SUFFIXES lib)
if (MPI_LIBRARIES_WORK AND MPI_LIB)
set(MPI_LIBRARIES_WORK ${MPI_LIBRARIES_WORK} ${MPI_LIB})
endif()
endif()
Allen Byrne
byrn at hdfgroup.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20111103/c749cc83/attachment.htm>
More information about the CMake
mailing list