CMake/Modules/FindMPI.cmake

27 lines
791 B
CMake
Raw Normal View History

2001-05-03 01:07:09 +04:00
#
# this module look sfor MPI (Message Passing Interface) support
# it will define the following values
#
# MPI_INCLUDE_PATH = where mpi.h can be found
# MPI_LIB_PATH = path to the mpi library
# MPI_LIBRARY = the library to link against (mpi mpich etc)
#
2001-05-03 01:33:26 +04:00
FIND_PATH(MPI_INCLUDE_PATH mpi.h /usr/local/include /usr/include /usr/local/mpi/include)
2001-05-03 01:07:09 +04:00
# look for the different MPI libs
IF (NOT MPI_LIB_PATH)
2001-05-03 01:33:26 +04:00
FIND_LIBRARY(MPI_LIB_PATH mpi /usr/lib /usr/local/lib /usr/local/mpi/lib)
2001-05-03 01:07:09 +04:00
IF (MPI_LIB_PATH)
SET (MPI_LIBRARY mpi CACHE)
ENDIF (MPI_LIB_PATH)
ENDIF (NOT MPI_LIB_PATH)
2001-05-03 01:33:26 +04:00
2001-05-03 01:07:09 +04:00
IF (NOT MPI_LIB_PATH)
2001-05-03 01:33:26 +04:00
FIND_LIBRARY(MPI_LIB_PATH mpich /usr/lib /usr/local/lib /usr/local/mpi/lib)
2001-05-03 01:07:09 +04:00
IF (MPI_LIB_PATH)
SET (MPI_LIBRARY mpich CACHE)
ENDIF (MPI_LIB_PATH)
ENDIF (NOT MPI_LIB_PATH)