From: Matthias Maier Date: Mon, 28 Sep 2015 04:54:51 +0000 (-0500) Subject: CMake: Add check for matching C++11 support X-Git-Tag: v8.4.0-rc2~364^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1682%2Fhead;p=dealii.git CMake: Add check for matching C++11 support --- diff --git a/cmake/configure/configure_2_trilinos.cmake b/cmake/configure/configure_2_trilinos.cmake index 5971f48998..45d50c2839 100644 --- a/cmake/configure/configure_2_trilinos.cmake +++ b/cmake/configure/configure_2_trilinos.cmake @@ -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()