summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineCompileFeatures.cmake
diff options
context:
space:
mode:
authorRaul Tambre <raul@tambre.ee>2020-12-04 15:46:07 (GMT)
committerRaul Tambre <raul@tambre.ee>2020-12-08 16:43:59 (GMT)
commit9f3c70a333f076aca61affff189232edaba89c38 (patch)
tree3a484b6802c039c2ec1922f95c5dee50d8fccd65 /Modules/CMakeDetermineCompileFeatures.cmake
parentaf7e1545c8219c6eebaff6272955e8cd99d175a5 (diff)
downloadCMake-9f3c70a333f076aca61affff189232edaba89c38.zip
CMake-9f3c70a333f076aca61affff189232edaba89c38.tar.gz
CMake-9f3c70a333f076aca61affff189232edaba89c38.tar.bz2
CUDA, CXX, OBJCXX: C++23 support with Clang 12
Clang 12 landed initial support for C++23 language mode flag -std={c|gnu}++2b in commit 6627a3c2873fdf7ccba1a1573371079be48b36e8.
Diffstat (limited to 'Modules/CMakeDetermineCompileFeatures.cmake')
-rw-r--r--Modules/CMakeDetermineCompileFeatures.cmake14
1 files changed, 13 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineCompileFeatures.cmake b/Modules/CMakeDetermineCompileFeatures.cmake
index b50e5f1..c03a85f 100644
--- a/Modules/CMakeDetermineCompileFeatures.cmake
+++ b/Modules/CMakeDetermineCompileFeatures.cmake
@@ -50,6 +50,7 @@ function(cmake_determine_compile_features lang)
set(CMAKE_CXX14_COMPILE_FEATURES)
set(CMAKE_CXX17_COMPILE_FEATURES)
set(CMAKE_CXX20_COMPILE_FEATURES)
+ set(CMAKE_CXX23_COMPILE_FEATURES)
include("${CMAKE_ROOT}/Modules/Internal/FeatureTesting.cmake")
@@ -60,6 +61,9 @@ function(cmake_determine_compile_features lang)
return()
endif()
+ if (CMAKE_CXX20_COMPILE_FEATURES AND CMAKE_CXX23_COMPILE_FEATURES)
+ list(REMOVE_ITEM CMAKE_CXX23_COMPILE_FEATURES ${CMAKE_CXX20_COMPILE_FEATURES})
+ endif()
if (CMAKE_CXX17_COMPILE_FEATURES AND CMAKE_CXX20_COMPILE_FEATURES)
list(REMOVE_ITEM CMAKE_CXX20_COMPILE_FEATURES ${CMAKE_CXX17_COMPILE_FEATURES})
endif()
@@ -80,6 +84,7 @@ function(cmake_determine_compile_features lang)
${CMAKE_CXX14_COMPILE_FEATURES}
${CMAKE_CXX17_COMPILE_FEATURES}
${CMAKE_CXX20_COMPILE_FEATURES}
+ ${CMAKE_CXX23_COMPILE_FEATURES}
)
endif()
@@ -89,6 +94,7 @@ function(cmake_determine_compile_features lang)
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)
+ set(CMAKE_CXX23_COMPILE_FEATURES ${CMAKE_CXX23_COMPILE_FEATURES} PARENT_SCOPE)
message(CHECK_PASS "done")
@@ -100,6 +106,7 @@ function(cmake_determine_compile_features lang)
set(CMAKE_CUDA14_COMPILE_FEATURES)
set(CMAKE_CUDA17_COMPILE_FEATURES)
set(CMAKE_CUDA20_COMPILE_FEATURES)
+ set(CMAKE_CUDA23_COMPILE_FEATURES)
include("${CMAKE_ROOT}/Modules/Internal/FeatureTesting.cmake")
@@ -110,7 +117,10 @@ function(cmake_determine_compile_features lang)
return()
endif()
- if (CMAKE_CUDA17_COMPILE_FEATURES AND CMAKE_CUDA20_COMPILE_FEATURES)
+ if (CMAKE_CUDA20_COMPILE_FEATURES AND CMAKE_CUDA23_COMPILE_FEATURES)
+ list(REMOVE_ITEM CMAKE_CUDA23_COMPILE_FEATURES ${CMAKE_CUDA20_COMPILE_FEATURES})
+ endif()
+ if (CMAKE_CUDA17_COMPILE_FEATURES AND CMAKE_CUDA20_COMPILE_FEATURES)
list(REMOVE_ITEM CMAKE_CUDA20_COMPILE_FEATURES ${CMAKE_CUDA17_COMPILE_FEATURES})
endif()
if (CMAKE_CUDA14_COMPILE_FEATURES AND CMAKE_CUDA17_COMPILE_FEATURES)
@@ -130,6 +140,7 @@ function(cmake_determine_compile_features lang)
${CMAKE_CUDA14_COMPILE_FEATURES}
${CMAKE_CUDA17_COMPILE_FEATURES}
${CMAKE_CUDA20_COMPILE_FEATURES}
+ ${CMAKE_CUDA23_COMPILE_FEATURES}
)
endif()
@@ -139,6 +150,7 @@ function(cmake_determine_compile_features lang)
set(CMAKE_CUDA14_COMPILE_FEATURES ${CMAKE_CUDA14_COMPILE_FEATURES} PARENT_SCOPE)
set(CMAKE_CUDA17_COMPILE_FEATURES ${CMAKE_CUDA17_COMPILE_FEATURES} PARENT_SCOPE)
set(CMAKE_CUDA20_COMPILE_FEATURES ${CMAKE_CUDA20_COMPILE_FEATURES} PARENT_SCOPE)
+ set(CMAKE_CUDA23_COMPILE_FEATURES ${CMAKE_CUDA23_COMPILE_FEATURES} PARENT_SCOPE)
message(CHECK_PASS "done")