summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorRaul Tambre <raul@tambre.ee>2024-03-25 19:10:04 (GMT)
committerRaul Tambre <raul@tambre.ee>2024-04-09 08:38:59 (GMT)
commitf21dbf8f26189f62220ec191fcfea9711d3401c5 (patch)
tree81243dabf491306f2d18b29f90085f9740a6a591 /Tests
parentc7cbe57e1f3a830ce53a0fe9f604adba11aa71e9 (diff)
downloadCMake-f21dbf8f26189f62220ec191fcfea9711d3401c5.zip
CMake-f21dbf8f26189f62220ec191fcfea9711d3401c5.tar.gz
CMake-f21dbf8f26189f62220ec191fcfea9711d3401c5.tar.bz2
C++26: Fix C++/CUDA/HIP compile feature support
In commit f808d8afb9 (CMake: Support upcoming C++26 language level, 2022-08-19, v3.25.0-rc1~218^2) we forgot some necessary scaffolding. Fixes: #25819
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CompileFeatures/CMakeLists.txt2
-rw-r--r--Tests/CompileFeatures/cxx_std_26.cpp4
2 files changed, 5 insertions, 1 deletions
diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt
index a33fad3..e206e70 100644
--- a/Tests/CompileFeatures/CMakeLists.txt
+++ b/Tests/CompileFeatures/CMakeLists.txt
@@ -7,7 +7,7 @@ project(CompileFeatures)
set(ext_C c)
set(ext_CXX cpp)
set(std_C 90 99 11 17 23)
-set(std_CXX 98 11 14 17 20 23)
+set(std_CXX 98 11 14 17 20 23 26)
foreach(lang C CXX)
foreach(std IN LISTS std_${lang})
diff --git a/Tests/CompileFeatures/cxx_std_26.cpp b/Tests/CompileFeatures/cxx_std_26.cpp
new file mode 100644
index 0000000..db3f6bc
--- /dev/null
+++ b/Tests/CompileFeatures/cxx_std_26.cpp
@@ -0,0 +1,4 @@
+#include "cxx_std.h"
+#if defined(CXX_STD) && CXX_STD <= CXX_STD_23
+# error "cxx_std_26 not honored"
+#endif