summaryrefslogtreecommitdiffstats
path: root/Modules/FindMPI.cmake
blob: cf39cf6774be19ca3d48643e25ea7e2e52bf0f81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# - Find MPI
# This module looks for MPI (Message Passing Interface) support
# it will define the following values
#  MPI_INCLUDE_PATH = where mpi.h can be found
#  MPI_LIBRARY    = the library to link in (mpi mpich etc)

FIND_PATH(MPI_INCLUDE_PATH mpi.h 
          /usr/local/include 
          /usr/include 
          /usr/include/mpi
          /usr/local/mpi/include
          "$ENV{ProgramFiles}/MPICH/SDK/Include"
          "$ENV{ProgramFiles}/MPICH2/include"
          "C:/Program Files/MPICH/SDK/Include" 
)

FIND_LIBRARY(MPI_LIBRARY 
             NAMES mpich2 mpi mpich 
             PATHS /usr/lib /usr/local/lib /usr/local/mpi/lib
             "$ENV{ProgramFiles}/MPICH/SDK/Lib"
             "$ENV{ProgramFiles}/MPICH2/Lib"
             "C:/Program Files/MPICH/SDK/Lib" 
)

FIND_LIBRARY(MPI_EXTRA_LIBRARY 
             NAMES mpi++
             PATHS /usr/lib /usr/local/lib /usr/local/mpi/lib 
             "$ENV{ProgramFiles}/MPICH/SDK/Lib"
             "C:/Program Files/MPICH/SDK/Lib" 
             DOC "If a second mpi library is necessary, specify it here.")

MARK_AS_ADVANCED(MPI_INCLUDE_PATH MPI_LIBRARY MPI_EXTRA_LIBRARY)