summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2001-05-02 21:07:09 (GMT)
committerKen Martin <ken.martin@kitware.com>2001-05-02 21:07:09 (GMT)
commit13f68ae1f235ab5b6a8ed86ee6341cd06cd96bde (patch)
tree9c0c2d59d9e2d09b90c9f72becab54cbbf822444 /Modules
parentc244378a861fd5d2c923c9452c0ab44343f7aac3 (diff)
downloadCMake-13f68ae1f235ab5b6a8ed86ee6341cd06cd96bde.zip
CMake-13f68ae1f235ab5b6a8ed86ee6341cd06cd96bde.tar.gz
CMake-13f68ae1f235ab5b6a8ed86ee6341cd06cd96bde.tar.bz2
new module
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindMPI.cmake25
1 files changed, 25 insertions, 0 deletions
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
new file mode 100644
index 0000000..d474301
--- /dev/null
+++ b/Modules/FindMPI.cmake
@@ -0,0 +1,25 @@
+#
+# 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)
+#
+
+FIND_INCLUDE(MPI_INCLUDE_PATH mpi.h /usr/local/include /usr/include)
+
+# look for the different MPI libs
+IF (NOT MPI_LIB_PATH)
+ FIND_LIBRARY(MPI_LIB_PATH mpi /usr/lib /usr/local/lib)
+ IF (MPI_LIB_PATH)
+ SET (MPI_LIBRARY mpi CACHE)
+ ENDIF (MPI_LIB_PATH)
+ENDIF (NOT MPI_LIB_PATH)
+IF (NOT MPI_LIB_PATH)
+ FIND_LIBRARY(MPI_LIB_PATH mpich /usr/lib /usr/local/lib)
+ IF (MPI_LIB_PATH)
+ SET (MPI_LIBRARY mpich CACHE)
+ ENDIF (MPI_LIB_PATH)
+ENDIF (NOT MPI_LIB_PATH)
+