From 7b70beace70d7e71dbccdd5cffc7ab778ef4910b Mon Sep 17 00:00:00 2001 From: adam Date: Tue, 13 Jul 2010 13:46:16 +0000 Subject: [PATCH] *** empty log message *** --- salome_adm/cmake_files/FindMPI.cmake | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/salome_adm/cmake_files/FindMPI.cmake b/salome_adm/cmake_files/FindMPI.cmake index 548b01b77..51536665f 100644 --- a/salome_adm/cmake_files/FindMPI.cmake +++ b/salome_adm/cmake_files/FindMPI.cmake @@ -80,6 +80,7 @@ IF(MPI_STATUS) MESSAGE(STATUS "MPI include ${MPI_INCLUDE_TO_FIND} found in ${MPI_INCLUDES}") + SET(MPI_INCLUDE_DIR ${MPI_INCLUDES}) SET(MPI_INCLUDES -I${MPI_INCLUDES}) # ------ @@ -91,9 +92,13 @@ IF(MPI_STATUS) FOREACH(lib mpi_cxx mpi mpich) FIND_LIBRARY(MPI_LIB ${lib} ${MPI_ROOT}/lib) IF(MPI_LIB) + IF(lib STREQUAL mpi_cxx) + SET(MPI_INCLUDES ${MPI_INCLUDES} -DOMPI_IGNORE_CXX_SEEK) + ENDIF(lib STREQUAL mpi_cxx) IF(lib STREQUAL mpich) SET(MPI_INCLUDES ${MPI_INCLUDES} -DMPICH_IGNORE_CXX_SEEK) ENDIF(lib STREQUAL mpich) + BREAK() ENDIF(MPI_LIB) ENDFOREACH(lib mpi_cxx mpi mpich) IF(NOT MPI_LIB) @@ -110,6 +115,18 @@ ENDIF(MPI_STATUS) # ------ +IF(MPI_STATUS) + include(CheckSymbolExists) + SET(CMAKE_REQUIRED_LIBRARIES ${MPI_LIBS}) + CHECK_SYMBOL_EXISTS(MPI_Publish_name ${MPI_INCLUDE_DIR}/mpi.h HAVE_MPI2) + IF(HAVE_MPI2) + MESSAGE(STATUS "Your mpi implemtentation is compatible with mpi2 ... adding -DHAVE_MPI2") + SET(MPI_INCLUDES ${MPI_INCLUDES} -DHAVE_MPI2) + ENDIF(HAVE_MPI2) +ENDIF(MPI_STATUS) + +# ------ + IF(MPI_STATUS) SET(MPI_IS_OK ON) ELSE(MPI_STATUS) -- 2.39.2