mpi.use.system.cmake 946 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
find_package(MPI)
if (MPI_C_FOUND)
  add_extra_cmake_args(
    -DMPIEXEC:FILEPATH=${MPIEXEC}
    -DMPIEXEC_MAX_NUMPROCS:STRING=${MPIEXEC_MAX_NUMPROCS}
    -DMPIEXEC_NUMPROC_FLAG:STRING=${MPIEXEC_NUMPROC_FLAG}
    -DMPIEXEC_POSTFLAGS:STRING=${MPIEXEC_POSTFLAGS}
    -DMPIEXEC_PREFLAGS:STRING=${MPIEXEC_PREFLAGS}
    -DMPI_CXX_COMPILER:FILEPATH=${MPI_CXX_COMPILER}
    -DMPI_CXX_COMPILE_FLAGS:STRING=${MPI_CXX_COMPILE_FLAGS}
    -DMPI_CXX_INCLUDE_PATH:STRING=${MPI_CXX_INCLUDE_PATH}
12
    -DMPI_CXX_LIBRARIES:STRING=${MPI_CXX_LIBRARIES}
13 14 15 16
    -DMPI_CXX_LINK_FLAGS:STRING=${MPI_CXX_LINK_FLAGS}
    -DMPI_C_COMPILER:FILEPATH=${MPI_C_COMPILER}
    -DMPI_C_COMPILE_FLAGS:STRING=${MPI_C_COMPILE_FLAGS}
    -DMPI_C_INCLUDE_PATH:STRING=${MPI_C_INCLUDE_PATH}
17
    -DMPI_C_LIBRARIES:STRING=${MPI_C_LIBRARIES}
18
    -DMPI_C_LINK_FLAGS:STRING=${MPI_C_LINK_FLAGS}
19 20
    -DMPI_EXTRA_LIBRARY:STRING=${MPI_EXTRA_LIBRARY}
    -DMPI_LIBRARY:FILEPATH=${MPI_LIBRARY})
21
endif()