summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-05-03 15:29:41 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-05-03 15:30:04 (GMT)
commit784dd90fd40ff3cdc9fb44d37c0eef992ed05a92 (patch)
tree1affca3f4d2438c0adca6a3b5b6ae5c9047cc609
parent713f1a0e7da7c76b0502b4ee885a74eb2e07c3b4 (diff)
parent3dbec532555eb4d088f35b4a2593ca1cc247dab0 (diff)
downloadCMake-784dd90fd40ff3cdc9fb44d37c0eef992ed05a92.zip
CMake-784dd90fd40ff3cdc9fb44d37c0eef992ed05a92.tar.gz
CMake-784dd90fd40ff3cdc9fb44d37c0eef992ed05a92.tar.bz2
Merge topic 'memorize_cxx_compilers_with_full_CXX14_support'
3dbec53255 CompileFeatures: Record when compilers gained full CXX14 support Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3280
-rw-r--r--Modules/Compiler/Clang-CXX.cmake2
-rw-r--r--Modules/Compiler/GNU-CXX.cmake4
-rw-r--r--Modules/Compiler/Intel-CXX.cmake10
3 files changed, 16 insertions, 0 deletions
diff --git a/Modules/Compiler/Clang-CXX.cmake b/Modules/Compiler/Clang-CXX.cmake
index 6fb0200..c116078 100644
--- a/Modules/Compiler/Clang-CXX.cmake
+++ b/Modules/Compiler/Clang-CXX.cmake
@@ -29,9 +29,11 @@ if(NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5)
set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++14")
set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++14")
+ set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON)
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4)
set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++1y")
set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++1y")
+ set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON)
endif()
set(_clang_version_std17 5.0)
diff --git a/Modules/Compiler/GNU-CXX.cmake b/Modules/Compiler/GNU-CXX.cmake
index 1253291..fcaaeab 100644
--- a/Modules/Compiler/GNU-CXX.cmake
+++ b/Modules/Compiler/GNU-CXX.cmake
@@ -38,6 +38,10 @@ elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++1y")
endif()
+if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
+ set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON)
+endif()
+
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)
set(CMAKE_CXX17_STANDARD_COMPILE_OPTION "-std=c++17")
set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std=gnu++17")
diff --git a/Modules/Compiler/Intel-CXX.cmake b/Modules/Compiler/Intel-CXX.cmake
index 032071c..44b0c3d 100644
--- a/Modules/Compiler/Intel-CXX.cmake
+++ b/Modules/Compiler/Intel-CXX.cmake
@@ -40,6 +40,16 @@ else()
set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std=gnu++17")
endif()
+ # While full C++14 support was first introduced in Intel 17,
+ # Intel 18.0.0-4 don't have full support as they broke
+ # support for cxx_relaxed_constexpr.
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 18.0.4)
+ set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON)
+ elseif(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 17.0.0
+ AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0.0)
+ set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON)
+ endif()
+
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0.2)
set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++14")
elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0.0)