summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineCompileFeatures.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-04-02 14:00:00 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-04-02 14:01:23 (GMT)
commit1b6ec4b9e34a06c047cb41245587673959b5b591 (patch)
tree4945534c7f8b71ea81c4a9c708e2531d907e275c /Modules/CMakeDetermineCompileFeatures.cmake
parent5d5e1e691772ecfd9224be0afe33802f8aee3fc3 (diff)
parent8570dc7f64928ec7896197394f089f5ad063c6ca (diff)
downloadCMake-1b6ec4b9e34a06c047cb41245587673959b5b591.zip
CMake-1b6ec4b9e34a06c047cb41245587673959b5b591.tar.gz
CMake-1b6ec4b9e34a06c047cb41245587673959b5b591.tar.bz2
Merge topic 'features-c++20'
8570dc7f64 Help: Update compiler versions in cmake-compile-features.7.rst 874d3d2948 Help: Add release note for C++ 20 support 7f295b1bd3 Features: Activate C++ 20 support for Clang 5.0+ 71cb8ce3a1 Features: Activate C++ 20 support for GNU 8.0+ 8f146c4508 Features: Activate C++ 20 support for MSVC 19.12.25835+ 7fe580a362 Features: Add infrastructure for C++ 20 language standard 1b328e09a3 Features: Use -std=c++17 for C++ 17 on Clang 5.0+ 0bc3e5788a Features: Use -std=c++17 for C++ 17 on GNU 8.0+ Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1892
Diffstat (limited to 'Modules/CMakeDetermineCompileFeatures.cmake')
-rw-r--r--Modules/CMakeDetermineCompileFeatures.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCompileFeatures.cmake b/Modules/CMakeDetermineCompileFeatures.cmake
index 3ed92be..01a81a1 100644
--- a/Modules/CMakeDetermineCompileFeatures.cmake
+++ b/Modules/CMakeDetermineCompileFeatures.cmake
@@ -49,6 +49,7 @@ function(cmake_determine_compile_features lang)
set(CMAKE_CXX11_COMPILE_FEATURES)
set(CMAKE_CXX14_COMPILE_FEATURES)
set(CMAKE_CXX17_COMPILE_FEATURES)
+ set(CMAKE_CXX20_COMPILE_FEATURES)
include("${CMAKE_ROOT}/Modules/Internal/FeatureTesting.cmake")
@@ -59,6 +60,9 @@ function(cmake_determine_compile_features lang)
return()
endif()
+ if (CMAKE_CXX17_COMPILE_FEATURES AND CMAKE_CXX20_COMPILE_FEATURES)
+ list(REMOVE_ITEM CMAKE_CXX20_COMPILE_FEATURES ${CMAKE_CXX17_COMPILE_FEATURES})
+ endif()
if (CMAKE_CXX14_COMPILE_FEATURES AND CMAKE_CXX17_COMPILE_FEATURES)
list(REMOVE_ITEM CMAKE_CXX17_COMPILE_FEATURES ${CMAKE_CXX14_COMPILE_FEATURES})
endif()
@@ -75,6 +79,7 @@ function(cmake_determine_compile_features lang)
${CMAKE_CXX11_COMPILE_FEATURES}
${CMAKE_CXX14_COMPILE_FEATURES}
${CMAKE_CXX17_COMPILE_FEATURES}
+ ${CMAKE_CXX20_COMPILE_FEATURES}
)
endif()
@@ -83,6 +88,7 @@ function(cmake_determine_compile_features lang)
set(CMAKE_CXX11_COMPILE_FEATURES ${CMAKE_CXX11_COMPILE_FEATURES} PARENT_SCOPE)
set(CMAKE_CXX14_COMPILE_FEATURES ${CMAKE_CXX14_COMPILE_FEATURES} PARENT_SCOPE)
set(CMAKE_CXX17_COMPILE_FEATURES ${CMAKE_CXX17_COMPILE_FEATURES} PARENT_SCOPE)
+ set(CMAKE_CXX20_COMPILE_FEATURES ${CMAKE_CXX20_COMPILE_FEATURES} PARENT_SCOPE)
message(STATUS "Detecting ${lang} compile features - done")
endif()