]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Add check for matching C++11 support 1682/head
authorMatthias Maier <tamiko@43-1.org>
Mon, 28 Sep 2015 04:54:51 +0000 (23:54 -0500)
committerMatthias Maier <tamiko@43-1.org>
Mon, 28 Sep 2015 05:01:35 +0000 (00:01 -0500)
cmake/configure/configure_2_trilinos.cmake

index 5971f48998dce1d2a46fc8d751a5a6cdc2a57126..45d50c28391da1840b2ff23c895d38a33de6ef92 100644 (file)
@@ -122,7 +122,8 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
     # unsigned int.
     #
     IF(TRILINOS_WITH_NO_32BIT_INDICES AND NOT DEAL_II_WITH_64BIT_INDICES)
-      MESSAGE(STATUS "deal.II was configured to use 32bit global indices but "
+      MESSAGE(STATUS "Could not find a sufficient Trilinos installation: "
+        "deal.II was configured to use 32bit global indices but "
         "Trilinos was not."
         )
       SET(TRILINOS_ADDITIONAL_ERROR_STRING
@@ -141,7 +142,8 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
     # unsigned long long int.
     #
     IF(TRILINOS_WITH_NO_64BIT_INDICES AND DEAL_II_WITH_64BIT_INDICES)
-      MESSAGE(STATUS "deal.II was configured to use 64bit global indices but "
+      MESSAGE(STATUS "Could not find a sufficient Trilinos installation: "
+        "deal.II was configured to use 64bit global indices but "
         "Trilinos was not."
         )
       SET(TRILINOS_ADDITIONAL_ERROR_STRING
@@ -180,6 +182,26 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
       ENDIF()
     ENDIF()
 
+    #
+    # Newer Trilinos versions (12.0.1 or newer) require a matching C++11
+    # support. I.e., if Trilinos is configured with C++11 support, deal.II
+    # also has to be configured with C++11 support:
+    #
+    IF(TRILINOS_WITH_MANDATORY_CXX11 AND NOT DEAL_II_WITH_CXX11)
+      MESSAGE(STATUS "Could not find a sufficient Trilinos installation: "
+        "Trilinos was compiled with C++11 support, but C++11 support is "
+        "disabled (DEAL_II_WITH_CXX11=off)."
+        )
+      SET(TRILINOS_ADDITIONAL_ERROR_STRING
+        ${TRILINOS_ADDITIONAL_ERROR_STRING}
+        "The Trilinos installation (found at \"${TRILINOS_DIR}\")\n"
+        "requires C++11 support, but C++11 support is disabled:\n"
+        "  DEAL_II_WITH_CXX11 = ${DEAL_II_WITH_CXX11}\n"
+        )
+      SET(${var} FALSE)
+
+    ENDIF()
+
     CHECK_MPI_INTERFACE(TRILINOS ${var})
   ENDIF()
 ENDMACRO()

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.