summaryrefslogtreecommitdiffstats
path: root/Tests/CompileFeatures
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-04-17 16:05:29 (GMT)
committerBrad King <brad.king@kitware.com>2024-04-19 12:39:15 (GMT)
commitfb0990ef04ab3c3f56bb6399403fc563b9dc89f8 (patch)
tree9fcc0b4289d1e623c29364f3e24ef566915baf9c /Tests/CompileFeatures
parent011f3d1dd345500969f106093dbc6a046e3f6365 (diff)
downloadCMake-fb0990ef04ab3c3f56bb6399403fc563b9dc89f8.zip
CMake-fb0990ef04ab3c3f56bb6399403fc563b9dc89f8.tar.gz
CMake-fb0990ef04ab3c3f56bb6399403fc563b9dc89f8.tar.bz2
Tests/CompileFeatures: Cover cuda_std_## meta-features
Diffstat (limited to 'Tests/CompileFeatures')
-rw-r--r--Tests/CompileFeatures/CMakeLists.txt8
-rw-r--r--Tests/CompileFeatures/cuda_std_03.cu0
-rw-r--r--Tests/CompileFeatures/cuda_std_11.cu4
-rw-r--r--Tests/CompileFeatures/cuda_std_14.cu4
-rw-r--r--Tests/CompileFeatures/cuda_std_17.cu4
-rw-r--r--Tests/CompileFeatures/cuda_std_20.cu4
-rw-r--r--Tests/CompileFeatures/cuda_std_23.cu4
-rw-r--r--Tests/CompileFeatures/cuda_std_26.cu4
8 files changed, 31 insertions, 1 deletions
diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt
index 8f118f3..469a085 100644
--- a/Tests/CompileFeatures/CMakeLists.txt
+++ b/Tests/CompileFeatures/CMakeLists.txt
@@ -9,7 +9,13 @@ set(ext_CXX cpp)
set(std_C 90 99 11 17 23)
set(std_CXX 98 11 14 17 20 23 26)
-foreach(lang C CXX)
+if(CMake_TEST_CUDA)
+ enable_language(CUDA)
+ set(ext_CUDA cu)
+ set(std_CUDA 03 11 14 17 20 23 26)
+endif()
+
+foreach(lang C CXX CUDA)
foreach(std IN LISTS std_${lang})
string(TOLOWER "${lang}_std_${std}" feature)
if("${std}" IN_LIST CMake_TEST_${lang}_STANDARDS
diff --git a/Tests/CompileFeatures/cuda_std_03.cu b/Tests/CompileFeatures/cuda_std_03.cu
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/CompileFeatures/cuda_std_03.cu
diff --git a/Tests/CompileFeatures/cuda_std_11.cu b/Tests/CompileFeatures/cuda_std_11.cu
new file mode 100644
index 0000000..76813fd
--- /dev/null
+++ b/Tests/CompileFeatures/cuda_std_11.cu
@@ -0,0 +1,4 @@
+#include "cxx_std.h"
+#if defined(CXX_STD) && CXX_STD < CXX_STD_11
+# error "cuda_std_11 not honored"
+#endif
diff --git a/Tests/CompileFeatures/cuda_std_14.cu b/Tests/CompileFeatures/cuda_std_14.cu
new file mode 100644
index 0000000..53e23c8
--- /dev/null
+++ b/Tests/CompileFeatures/cuda_std_14.cu
@@ -0,0 +1,4 @@
+#include "cxx_std.h"
+#if defined(CXX_STD) && CXX_STD <= CXX_STD_11
+# error "cuda_std_14 not honored"
+#endif
diff --git a/Tests/CompileFeatures/cuda_std_17.cu b/Tests/CompileFeatures/cuda_std_17.cu
new file mode 100644
index 0000000..502defb
--- /dev/null
+++ b/Tests/CompileFeatures/cuda_std_17.cu
@@ -0,0 +1,4 @@
+#include "cxx_std.h"
+#if defined(CXX_STD) && CXX_STD <= CXX_STD_14
+# error "cuda_std_17 not honored"
+#endif
diff --git a/Tests/CompileFeatures/cuda_std_20.cu b/Tests/CompileFeatures/cuda_std_20.cu
new file mode 100644
index 0000000..afdd3ba
--- /dev/null
+++ b/Tests/CompileFeatures/cuda_std_20.cu
@@ -0,0 +1,4 @@
+#include "cxx_std.h"
+#if defined(CXX_STD) && CXX_STD <= CXX_STD_17
+# error "cuda_std_20 not honored"
+#endif
diff --git a/Tests/CompileFeatures/cuda_std_23.cu b/Tests/CompileFeatures/cuda_std_23.cu
new file mode 100644
index 0000000..6bdaeb9
--- /dev/null
+++ b/Tests/CompileFeatures/cuda_std_23.cu
@@ -0,0 +1,4 @@
+#include "cxx_std.h"
+#if defined(CXX_STD) && CXX_STD <= CXX_STD_20
+# error "cuda_std_23 not honored"
+#endif
diff --git a/Tests/CompileFeatures/cuda_std_26.cu b/Tests/CompileFeatures/cuda_std_26.cu
new file mode 100644
index 0000000..efeca8d
--- /dev/null
+++ b/Tests/CompileFeatures/cuda_std_26.cu
@@ -0,0 +1,4 @@
+#include "cxx_std.h"
+#if defined(CXX_STD) && CXX_STD <= CXX_STD_23
+# error "cuda_std_26 not honored"
+#endif