summaryrefslogtreecommitdiffstats
path: root/Modules/FindCUDA
diff options
context:
space:
mode:
authorHenry Schreiner <henryschreineriii@gmail.com>2021-01-19 19:43:14 (GMT)
committerBrad King <brad.king@kitware.com>2021-01-20 17:27:54 (GMT)
commita58a57245986656b4eb0ee0d66ec9da6c715d22b (patch)
tree34800b60412fbac92daafd6236158d8c14b86583 /Modules/FindCUDA
parentfab301bb9d6d7d1c92db077fcd4789c0eb03203f (diff)
downloadCMake-a58a57245986656b4eb0ee0d66ec9da6c715d22b.zip
CMake-a58a57245986656b4eb0ee0d66ec9da6c715d22b.tar.gz
CMake-a58a57245986656b4eb0ee0d66ec9da6c715d22b.tar.bz2
CUDA: Add arch selection debug mode to print out CUDA versions
Diffstat (limited to 'Modules/FindCUDA')
-rw-r--r--Modules/FindCUDA/select_compute_arch.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/Modules/FindCUDA/select_compute_arch.cmake b/Modules/FindCUDA/select_compute_arch.cmake
index 9351288..b583308 100644
--- a/Modules/FindCUDA/select_compute_arch.cmake
+++ b/Modules/FindCUDA/select_compute_arch.cmake
@@ -107,6 +107,17 @@ if(CUDA_VERSION VERSION_GREATER_EQUAL "11.1")
endif()
endif()
+
+# Check with: cmake -DCUDA_VERSION=7.0 -P select_compute_arch.cmake
+if(DEFINED CMAKE_SCRIPT_MODE_FILE)
+ include(CMakePrintHelpers)
+ cmake_print_variables(CUDA_KNOWN_GPU_ARCHITECTURES)
+ cmake_print_variables(CUDA_COMMON_GPU_ARCHITECTURES)
+ cmake_print_variables(CUDA_LIMIT_GPU_ARCHITECTURE)
+ cmake_print_variables(CUDA_ALL_GPU_ARCHITECTURES)
+endif()
+
+
################################################################################################
# A function for automatic detection of GPUs installed (if autodetection is enabled)
# Usage: