summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas Gregor <doug.gregor@gmail.com>2008-04-10 20:54:20 (GMT)
committerDouglas Gregor <doug.gregor@gmail.com>2008-04-10 20:54:20 (GMT)
commit1100b52c7e3cb37f6689a149d0a122e4f1fe18b4 (patch)
tree82342d1f43df0a02b5c0eaa813a34f1aaa0d335b
parentd1281f5cbcdac0149226542879a9a0d15cdf4897 (diff)
downloadCMake-1100b52c7e3cb37f6689a149d0a122e4f1fe18b4.zip
CMake-1100b52c7e3cb37f6689a149d0a122e4f1fe18b4.tar.gz
CMake-1100b52c7e3cb37f6689a149d0a122e4f1fe18b4.tar.bz2
ENH: Deal with 32-bit and 64-bit variants of Microsoft's MPI properly
-rw-r--r--Modules/FindMPI.cmake12
1 files changed, 9 insertions, 3 deletions
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index 5e218e7..0923c00 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -216,13 +216,19 @@ else (MPI_COMPILE_CMDLINE)
"$ENV{SystemDrive}/Program Files/Microsoft Compute Cluster Pack/Include"
)
- # TODO: How do we know whether we're building 32-bit vs. 64-bit for MS-MPI?
+ # Decide between 32-bit and 64-bit libraries for Microsoft's MPI
+ if (CMAKE_CL_64)
+ set(MS_MPI_ARCH_DIR amd64)
+ else (CMAKE_CL_64)
+ set(MS_MPI_ARCH_DIR i386)
+ endif (CMAKE_CL_64)
+
find_library(MPI_LIBRARY
- NAMES mpi mpich
+ NAMES mpi mpich msmpi
PATHS /usr/lib /usr/local/lib /usr/local/mpi/lib
"C:/Program Files/MPICH/SDK/Lib"
"$ENV{SystemDrive}/Program Files/MPICH/SDK/Lib"
- "$ENV{SystemDrive}/Program Files/Microsoft Compute Cluster Pack/Lib/i386"
+ "$ENV{SystemDrive}/Program Files/Microsoft Compute Cluster Pack/Lib/${MS_MPI_ARCH_DIR}"
)
find_library(MPI_LIBRARY
NAMES mpich2