Salome HOME
MPI fixes.
[modules/kernel.git] / salome_adm / cmake_files / FindSalomeMPI.cmake
index 9eee1cf0b0e85e846d0e9fb70f2693ceca6e7353..d9e6ec1c56f7782a3e4fb380024a96c4f3586e10 100644 (file)
@@ -35,7 +35,8 @@ IF(MPI_FOUND)
   # otherwise take ours.
   include(CheckSymbolExists)
   SET(CMAKE_REQUIRED_LIBRARIES ${MPI_LIBRARIES})
-  CHECK_SYMBOL_EXISTS(MPI_Publish_name ${MPI_C_INCLUDE_PATH}/mpi.h MPI2_IS_OK)
+  SET(CMAKE_REQUIRED_INCLUDES ${MPI_C_INCLUDE_PATH})
+  CHECK_SYMBOL_EXISTS(MPI_Publish_name mpi.h MPI2_IS_OK)
   SET(MPI_DEFINITIONS "${MPI_CXX_COMPILE_FLAGS}")
   IF(MPI2_IS_OK)
     MESSAGE(STATUS "Your mpi implementation is compatible with mpi2 ... adding -DHAVE_MPI2")