# 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")