Commit eb4ef64b authored by Dave Moxey's avatar Dave Moxey
Browse files

Merge remote-tracking branch 'lackhove/fix/mpi-cmake' into fix/mpi-cmake

parents 6da6a7ef e51e3fa5
...@@ -23,14 +23,10 @@ IF( NEKTAR_USE_MPI ) ...@@ -23,14 +23,10 @@ IF( NEKTAR_USE_MPI )
SET(MPI_BUILTIN OFF CACHE INTERNAL SET(MPI_BUILTIN OFF CACHE INTERNAL
"Determines whether MPI is built into the compiler") "Determines whether MPI is built into the compiler")
IF (NOT "${HAVE_MPI_H}" OR NOT "${HAVE_MPI_SEND}") IF (NOT "${HAVE_MPI_H}" OR NOT "${HAVE_MPI_SEND}")
INCLUDE (FindMPI) FIND_PACKAGE(MPI REQUIRED)
IF (MPI_C_FOUND) INCLUDE_DIRECTORIES( ${MPI_CXX_INCLUDE_PATH} )
INCLUDE_DIRECTORIES( ${MPI_C_INCLUDE_PATH} ) MESSAGE(STATUS "Found MPI: ${MPI_CXX_LIBRARIES}")
MESSAGE(STATUS "Found MPI: ${MPI_C_LIBRARIES}")
ELSE()
MESSAGE(FATAL_ERROR "Unable to find MPI installation")
ENDIF()
ELSE() ELSE()
SET(MPI_BUILTIN ON) SET(MPI_BUILTIN ON)
MESSAGE(STATUS "Found MPI: built in") MESSAGE(STATUS "Found MPI: built in")
......
...@@ -441,11 +441,11 @@ ENDIF() ...@@ -441,11 +441,11 @@ ENDIF()
IF( NEKTAR_USE_MPI ) IF( NEKTAR_USE_MPI )
TARGET_LINK_LIBRARIES(LibUtilities LINK_PRIVATE ${GSMPI_LIBRARY} ${XXT_LIBRARY}) TARGET_LINK_LIBRARIES(LibUtilities LINK_PRIVATE ${GSMPI_LIBRARY} ${XXT_LIBRARY})
IF (NOT MPI_BUILTIN) IF (NOT MPI_BUILTIN)
TARGET_LINK_LIBRARIES(LibUtilities LINK_PUBLIC ${MPI_C_LIBRARIES}) TARGET_LINK_LIBRARIES(LibUtilities LINK_PUBLIC ${MPI_CXX_LIBRARIES})
SET_TARGET_PROPERTIES(LibUtilities SET_TARGET_PROPERTIES(LibUtilities
PROPERTIES LINK_FLAGS "${THE_LINK_FLAGS} ${MPI_C_LINK_FLAGS}") PROPERTIES LINK_FLAGS "${THE_LINK_FLAGS} ${MPI_CXX_LINK_FLAGS}")
SET_TARGET_PROPERTIES(LibUtilities SET_TARGET_PROPERTIES(LibUtilities
PROPERTIES COMPILE_FLAGS "${THE_COMPILE_FLAGS} ${MPI_C_COMPILE_FLAGS}") PROPERTIES COMPILE_FLAGS "${THE_COMPILE_FLAGS} ${MPI_CXX_COMPILE_FLAGS}")
ENDIF() ENDIF()
ADD_DEPENDENCIES(LibUtilities gsmpi-1.2.1) ADD_DEPENDENCIES(LibUtilities gsmpi-1.2.1)
ENDIF( NEKTAR_USE_MPI ) ENDIF( NEKTAR_USE_MPI )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment