summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-01-08 19:57:55 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-01-08 19:57:55 (GMT)
commit038caf38b2c72577f2ad74b5a24c522e5537fb96 (patch)
treeccf2a047ac674c916a09cbd31153eabda42da015 /Modules
parent35ea14050ee41f9ea1c540ef2f582607b3d50925 (diff)
parentab4d1d07e44b42d963aaec8b8b4cdd57c938ea9d (diff)
downloadCMake-038caf38b2c72577f2ad74b5a24c522e5537fb96.zip
CMake-038caf38b2c72577f2ad74b5a24c522e5537fb96.tar.gz
CMake-038caf38b2c72577f2ad74b5a24c522e5537fb96.tar.bz2
Merge topic 'find-msmpi'
ab4d1d07 FindMPI: MSMPI changed the subdirectories it uses 82724394 FindMPI: add more search paths for MSMPI
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindMPI.cmake12
1 files changed, 9 insertions, 3 deletions
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index 8e39a7f..9192054 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -174,7 +174,11 @@ set(_MPI_EXEC_NAMES mpiexec mpirun lamexec srun)
# Grab the path to MPI from the registry if we're on windows.
set(_MPI_PREFIX_PATH)
if(WIN32)
+ # MSMPI
+ list(APPEND _MPI_PREFIX_PATH "$ENV{MSMPI_BIN}")
list(APPEND _MPI_PREFIX_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MPI;InstallRoot]/Bin")
+ list(APPEND _MPI_PREFIX_PATH "$ENV{MSMPI_INC}/..") # The SDK is installed separately from the runtime
+ # MPICH
list(APPEND _MPI_PREFIX_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH\\SMPD;binary]/..")
list(APPEND _MPI_PREFIX_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH2;Path]")
list(APPEND _MPI_PREFIX_PATH "$ENV{ProgramW6432}/MPICH2/")
@@ -422,16 +426,18 @@ function (interrogate_mpi_compiler lang try_libs)
# Decide between 32-bit and 64-bit libraries for Microsoft's MPI
if("${CMAKE_SIZEOF_VOID_P}" EQUAL 8)
- set(MS_MPI_ARCH_DIR amd64)
+ set(MS_MPI_ARCH_DIR x64)
+ set(MS_MPI_ARCH_DIR2 amd64)
else()
- set(MS_MPI_ARCH_DIR i386)
+ set(MS_MPI_ARCH_DIR x86)
+ set(MS_MPI_ARCH_DIR2 i386)
endif()
set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE)
find_library(MPI_LIB
NAMES mpi mpich mpich2 msmpi
HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH}
- PATH_SUFFIXES lib lib/${MS_MPI_ARCH_DIR} Lib Lib/${MS_MPI_ARCH_DIR})
+ PATH_SUFFIXES lib lib/${MS_MPI_ARCH_DIR} Lib Lib/${MS_MPI_ARCH_DIR} Lib/${MS_MPI_ARCH_DIR2})
set(MPI_LIBRARIES_WORK ${MPI_LIB})
# Right now, we only know about the extra libs for C++.