mirror of
https://github.com/reactos/CMake.git
synced 2024-11-25 20:49:41 +00:00
Add MPICH2 and Microsoft HPC paths, add paths to find mpiexec. Now it works better automatically on Windows. Thanks to Dave Partyka for developing the patch.
This commit is contained in:
parent
cdb966532b
commit
5655ac46f0
@ -58,8 +58,14 @@ find_program(MPI_COMPILER
|
||||
DOC "MPI compiler. Used only to detect MPI compilation flags.")
|
||||
mark_as_advanced(MPI_COMPILER)
|
||||
|
||||
file(TO_CMAKE_PATH "$ENV{ProgramFiles}" ProgramFiles)
|
||||
find_program(MPIEXEC
|
||||
NAMES mpiexec mpirun lamexec
|
||||
PATHS /usr/bin /usr/local/bin /usr/local/mpi/bin
|
||||
"$ENV{SystemDrive}/Program Files/MPICH/SDK/Bin"
|
||||
"${ProgramFiles}/MPICH2/Bin
|
||||
"$ENV{SystemDrive}/Program Files/Microsoft Compute Cluster Pack/Bin"
|
||||
"$ENV{SystemDrive}/Program Files/Microsoft HPC Pack 2008 SDK/Bin"
|
||||
DOC "Executable for running MPI programs.")
|
||||
|
||||
set(MPIEXEC_NUMPROC_FLAG "-np" CACHE STRING "Flag used by MPI to specify the number of processes for MPIEXEC; the next option will be the number of processes.")
|
||||
@ -247,34 +253,36 @@ else (MPI_COMPILE_CMDLINE)
|
||||
/usr/include
|
||||
/usr/include/mpi
|
||||
/usr/local/mpi/include
|
||||
"C:/Program Files/MPICH/SDK/Include"
|
||||
"$ENV{SystemDrive}/Program Files/MPICH2/include"
|
||||
"$ENV{SystemDrive}/Program Files/MPICH/SDK/Include"
|
||||
"${ProgramFiles}/MPICH2/include"
|
||||
"$ENV{SystemDrive}/Program Files/Microsoft Compute Cluster Pack/Include"
|
||||
"$ENV{SystemDrive}/Program Files/Microsoft HPC Pack 2008 SDK/Include"
|
||||
)
|
||||
|
||||
|
||||
# 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 msmpi
|
||||
PATHS /usr/lib /usr/local/lib /usr/local/mpi/lib
|
||||
"C:/Program Files/MPICH/SDK/Lib"
|
||||
"$ENV{SystemDrive}/Program Files/MPICH/SDK/Lib"
|
||||
"${ProgramFiles}/MPICH2/Lib
|
||||
"$ENV{SystemDrive}/Program Files/Microsoft Compute Cluster Pack/Lib/${MS_MPI_ARCH_DIR}"
|
||||
"$ENV{SystemDrive}/Program Files/Microsoft HPC Pack 2008 SDK/Lib/${MS_MPI_ARCH_DIR}"
|
||||
)
|
||||
find_library(MPI_LIBRARY
|
||||
find_library(MPI_LIBRARY
|
||||
NAMES mpich2
|
||||
PATHS
|
||||
"$ENV{SystemDrive}/Program Files/MPICH2/Lib")
|
||||
"${ProgramFiles}/MPICH2/Lib")
|
||||
|
||||
find_library(MPI_EXTRA_LIBRARY
|
||||
NAMES mpi++
|
||||
PATHS /usr/lib /usr/local/lib /usr/local/mpi/lib
|
||||
"C:/Program Files/MPICH/SDK/Lib"
|
||||
"$ENV{SystemDrive}/Program Files/MPICH/SDK/Lib"
|
||||
DOC "Extra MPI libraries to link against.")
|
||||
|
||||
set(MPI_COMPILE_FLAGS "" CACHE STRING "MPI compilation flags")
|
||||
|
Loading…
Reference in New Issue
Block a user