Skip to content

Commit

Permalink
cmake V3.10.2 has changed the variable names used for MPI
Browse files Browse the repository at this point in the history
  • Loading branch information
hkaiser committed Jan 19, 2018
1 parent 57730a9 commit 5807fb5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions plugins/parcelport/mpi/CMakeLists.txt
Expand Up @@ -44,11 +44,19 @@ if(HPX_WITH_PARCELPORT_MPI)
hpx_debug("add_parcelport_mpi_module")
if(MPI_CXX_INCLUDE_PATH)
include_directories(${MPI_CXX_INCLUDE_PATH})
elseif(MPI_CXX_HEADER_DIR)
# cmake V3.10.2 has changed the name for the MPI include directory
include_directories(${MPI_CXX_HEADER_DIR})
endif()

set(_mpi_libraries)
if(MPI_C_LIBRARIES)
set(_mpi_libraries ${_mpi_libraries} ${MPI_C_LIBRARIES})
elseif(MPI_C_LIB_NAMES)
# cmake V3.10.2 has changed the way MPI libraries are being discovered
foreach(lib ${MPI_C_LIB_NAMES})
set(_mpi_libraries ${_mpi_libraries} ${MPI_${lib}_LIBRARY})
endforeach()
endif()
if(MPI_LIBRARY)
set(_mpi_libraries ${_mpi_libraries} ${MPI_LIBRARY})
Expand Down

0 comments on commit 5807fb5

Please sign in to comment.