Changed MPI configuration to hopefully work on more systems.
This commit is contained in:
parent
ca180796c9
commit
44ac0f1d52
@ -735,17 +735,15 @@ endif ()
|
||||
# Set MPI compile flags
|
||||
if (NOT HYPRE_SEQUENTIAL)
|
||||
find_package (MPI)
|
||||
if ((MPI_C_FOUND) AND (NOT MPI_C_COMPILER))
|
||||
if ((MPI_C_FOUND) AND (NOT CMAKE_C_COMPILER STREQUAL MPI_C_COMPILER))
|
||||
include_directories (${MPI_C_INCLUDE_PATH})
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MPI_C_COMPILE_FLAGS}")
|
||||
endif ((MPI_C_FOUND) AND (NOT MPI_C_COMPILER))
|
||||
if ((MPI_CXX_FOUND) AND (NOT MPI_CXX_COMPILER))
|
||||
endif ()
|
||||
if ((MPI_CXX_FOUND) AND (NOT CMAKE_CXX_COMPILER STREQUAL MPI_CXX_COMPILER))
|
||||
include_directories (${MPI_CXX_INCLUDE_PATH})
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MPI_CXX_COMPILE_FLAGS}")
|
||||
endif ((MPI_CXX_FOUND) AND (NOT MPI_CXX_COMPILER))
|
||||
endif ()
|
||||
endif (NOT HYPRE_SEQUENTIAL)
|
||||
# set (HYPRE_MPI_C_INCLUDE_PATH "${MPI_C_INCLUDE_PATH}" CACHE PATH
|
||||
# "MPI include path")
|
||||
|
||||
# Set OpenMP compile flags
|
||||
if (HYPRE_USING_OPENMP)
|
||||
|
||||
@ -5,6 +5,9 @@ project (hypre-test)
|
||||
set (HYPRE_INSTALL_DIR "${PROJECT_SOURCE_DIR}/../hypre" CACHE PATH
|
||||
"Installation directory for HYPRE")
|
||||
|
||||
# Set default compile optimization flag
|
||||
set (CMAKE_BUILD_TYPE "RELEASE" CACHE INTERNAL "" FORCE)
|
||||
|
||||
# Include directories
|
||||
set (HYPRE_INCLUDE_DIRS "")
|
||||
list (APPEND HYPRE_INCLUDE_DIRS
|
||||
@ -29,6 +32,16 @@ endif (UNIX)
|
||||
# CXXDEFS = -DNOFEI -DHYPRE_TIMING -DMPICH_SKIP_MPICXX
|
||||
# -lstdc++ -lm
|
||||
|
||||
# Set MPI compile flags
|
||||
if (NOT HYPRE_SEQUENTIAL)
|
||||
find_package (MPI)
|
||||
if ((MPI_C_FOUND) AND (NOT CMAKE_C_COMPILER STREQUAL MPI_C_COMPILER))
|
||||
include_directories (${MPI_C_INCLUDE_PATH})
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MPI_C_COMPILE_FLAGS}")
|
||||
list (APPEND HYPRE_LIBS ${MPI_C_LIBRARIES})
|
||||
endif ()
|
||||
endif (NOT HYPRE_SEQUENTIAL)
|
||||
|
||||
include_directories (${HYPRE_INCLUDE_DIRS})
|
||||
link_directories (${HYPRE_LIB_DIRS})
|
||||
add_definitions (-DHYPRE_TIMING)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user