From: Daniel Arndt Date: Thu, 6 Jul 2023 12:34:17 +0000 (-0400) Subject: Update minimum compiler versions for C++17 X-Git-Tag: relicensing~730^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91c5c24610d1eb8d05983364cd5f1b77c450c94a;p=dealii.git Update minimum compiler versions for C++17 --- diff --git a/cmake/checks/check_01_cxx_features.cmake b/cmake/checks/check_01_cxx_features.cmake index da8701b5c8..6b15b29b93 100644 --- a/cmake/checks/check_01_cxx_features.cmake +++ b/cmake/checks/check_01_cxx_features.cmake @@ -327,7 +327,7 @@ if(NOT DEAL_II_HAVE_CXX17) message(FATAL_ERROR "\nThe current version of deal.II requires a compiler with enabled " "C++17 support. Make sure to use a modern enough compiler (GCC version " - "8 onwards, Clang version 8 onwards, or Microsoft MS VS 2019 onwards) " + "9 onwards, Clang version 10 onwards, or Microsoft MS VS 2019 onwards) " "and check that the compiler flag \"-std=\" is either unset, or set to " "at least c++17. Similarly, please make sure that the CMake variable " "CMAKE_CXX_STANDARD is either unset, or set at least to 17.\n\n" diff --git a/cmake/setup_compiler_flags.cmake b/cmake/setup_compiler_flags.cmake index 39799f0eef..b2acd57492 100644 --- a/cmake/setup_compiler_flags.cmake +++ b/cmake/setup_compiler_flags.cmake @@ -42,7 +42,7 @@ # enable_if_supported(DEAL_II_CXX_FLAGS "-fpic") # enable_if_links(DEAL_II_LINKER_FLAGS "-Wl,--as-needed") # -# Checks for compiler features (such as C++14 support) and compiler +# Checks for compiler features (such as C++17 support) and compiler # specific bugs that # - usually set up further configuration (such as preprocessor # definitions) diff --git a/cmake/setup_compiler_flags_gnu.cmake b/cmake/setup_compiler_flags_gnu.cmake index aeed104ec6..08eca34883 100644 --- a/cmake/setup_compiler_flags_gnu.cmake +++ b/cmake/setup_compiler_flags_gnu.cmake @@ -21,18 +21,18 @@ # if( CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND - CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0" ) + CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0" ) message(FATAL_ERROR "\n" - "deal.II requires support for features of C++14 that are not present in\n" - "versions of GCC prior to 5.0." + "deal.II requires support for features of C++17 that are not present in\n" + "versions of GCC prior to 9.0." ) endif() if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND - CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.0" ) + CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0" ) message(FATAL_ERROR "\n" - "deal.II requires support for features of C++14 that are not present in\n" - "versions of Clang prior to 4.0." + "deal.II requires support for features of C++17 that are not present in\n" + "versions of Clang prior to 10.0." ) endif() @@ -40,10 +40,10 @@ endif() # https://en.wikipedia.org/wiki/Xcode#Xcode_7.0_-_11.x_(since_Free_On-Device_Development) if (POLICY CMP0025) if( CMAKE_CXX_COMPILER_ID MATCHES "AppleClang" AND - CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0" ) + CMAKE_CXX_COMPILER_VERSION VERSION_LESS "12.0" ) message(FATAL_ERROR "\n" - "deal.II requires support for features of C++14 that are not present in\n" - "versions of AppleClang prior to 9.0." + "deal.II requires support for features of C++17 that are not present in\n" + "versions of AppleClang prior to 12.0." ) endif() endif() diff --git a/cmake/setup_compiler_flags_intel.cmake b/cmake/setup_compiler_flags_intel.cmake index 845664505f..061f14d2f3 100644 --- a/cmake/setup_compiler_flags_intel.cmake +++ b/cmake/setup_compiler_flags_intel.cmake @@ -20,10 +20,10 @@ # editing this file. # -if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "15.0" ) +if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.0" ) message(WARNING "\n" "You're using an old version of the Intel C++ Compiler (icc/icpc)!\n" - "It is strongly recommended to use at least version 15.\n" + "It is strongly recommended to use at least version 19.\n" ) endif() diff --git a/cmake/setup_compiler_flags_msvc.cmake b/cmake/setup_compiler_flags_msvc.cmake index d4b4022215..60454ae910 100644 --- a/cmake/setup_compiler_flags_msvc.cmake +++ b/cmake/setup_compiler_flags_msvc.cmake @@ -27,14 +27,14 @@ # # ######################## -# Notice how intelligent the version numbering of "Microsoft Visual Studio 2017 -# version 15.0" is, the c++ compiler is advertised as "MSVC++ 14.1" but the -# version information is 19.10.x (this is the numbering used by CMake), see +# Notice how intelligent the version numbering of "Microsoft Visual Studio 2019 +# version 16.0" is, the c++ compiler is advertised as "MSVC++ 14.20" but the +# version information is 19.20.x (this is the numbering used by CMake), see # https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B#Internal_version_numbering -if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.10" ) +if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.20" ) message(FATAL_ERROR "\n" "You're using an old version of the Visual Studio C++ Compiler!\n" - "You need at least version Visual Studio 2017.\n" + "You need at least version Visual Studio 2019.\n" ) endif()