Check for MPI 2 functionality and activate it for DUNE.

This allow mixing the MPIHelper and MPI_Init/MPI_Finalize. This commit
makes OPM a bit more DUNE compatible.
This commit is contained in:
Markus Blatt
2016-09-16 18:17:19 +02:00
parent 37938bbf5e
commit a9d105c1a0
+10
View File
@@ -57,6 +57,7 @@ int main (void) {
HAVE_NULLPTR;
HAVE_STATIC_ASSERT;
HAVE_SHARED_PTR;
MPI_2;
SHARED_PTR_HEADER;
SHARED_PTR_NAMESPACE;
HAVE_TYPE_TRAITS;
@@ -66,6 +67,15 @@ int main (void) {
")
#debug_find_vars ("dune-common")
# check for MPI version 2
include(CMakePushCheckState)
include(CheckFunctionExists)
cmake_push_check_state()
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES};${MPI_CXX_LIBRARIES})
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES};${MPI_CXX_INCLUDES})
check_function_exists(MPI_Finalized MPI_2)
cmake_pop_check_state()
# make version number available in config.h
include (UseDuneVer)
find_dune_version ("dune" "common")