summaryrefslogtreecommitdiff
path: root/Tests
diff options
context:
space:
mode:
authorRobert Maynard <rmaynard@nvidia.com>2022-03-09 09:14:18 -0500
committerBrad King <brad.king@kitware.com>2022-03-09 12:30:12 -0500
commit2a79b647fac5fc702082385cb30fedf82a972b5e (patch)
treefc7ae6a9a1b7034159e766c6b24aa121ba77b198 /Tests
parent1aa51fb9e3ba3e9ddeafe4929c8f6f58a5fd34b7 (diff)
downloadcmake-2a79b647fac5fc702082385cb30fedf82a972b5e.tar.gz
CUDA: Restore support for CMAKE_CUDA_ARCHITECTURES=OFF
Fixes: #23309
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/CUDA_architectures/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/CUDA_architectures/architectures-not-set.cmake2
-rw-r--r--Tests/RunCMake/CUDA_architectures/architectures-off.cmake2
3 files changed, 6 insertions, 0 deletions
diff --git a/Tests/RunCMake/CUDA_architectures/RunCMakeTest.cmake b/Tests/RunCMake/CUDA_architectures/RunCMakeTest.cmake
index d16156e556..3b63d60855 100644
--- a/Tests/RunCMake/CUDA_architectures/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CUDA_architectures/RunCMakeTest.cmake
@@ -4,3 +4,5 @@ run_cmake(architectures-all)
run_cmake(architectures-all-major)
run_cmake(architectures-empty)
run_cmake(architectures-invalid)
+run_cmake(architectures-not-set)
+run_cmake(architectures-off)
diff --git a/Tests/RunCMake/CUDA_architectures/architectures-not-set.cmake b/Tests/RunCMake/CUDA_architectures/architectures-not-set.cmake
new file mode 100644
index 0000000000..ce5695ac9d
--- /dev/null
+++ b/Tests/RunCMake/CUDA_architectures/architectures-not-set.cmake
@@ -0,0 +1,2 @@
+unset(CMAKE_CUDA_ARCHITECTURES)
+enable_language(CUDA)
diff --git a/Tests/RunCMake/CUDA_architectures/architectures-off.cmake b/Tests/RunCMake/CUDA_architectures/architectures-off.cmake
new file mode 100644
index 0000000000..99881d3aca
--- /dev/null
+++ b/Tests/RunCMake/CUDA_architectures/architectures-off.cmake
@@ -0,0 +1,2 @@
+set(CMAKE_CUDA_ARCHITECTURES OFF)
+enable_language(CUDA)