From a58a57245986656b4eb0ee0d66ec9da6c715d22b Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Tue, 19 Jan 2021 14:43:14 -0500 Subject: CUDA: Add arch selection debug mode to print out CUDA versions --- Modules/FindCUDA/select_compute_arch.cmake | 11 +++++++++++ 1 file changed, 11 insertions(+) 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: -- cgit v0.12