Merge topic 'find-msmpi'
ab4d1d07
FindMPI: MSMPI changed the subdirectories it uses82724394
FindMPI: add more search paths for MSMPI
This commit is contained in:
commit
038caf38b2
|
@ -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++.
|
||||
|
|
Loading…
Reference in New Issue