From 7676d4093233efdbde2f28a6041b88c4e08c2484 Mon Sep 17 00:00:00 2001 From: Jeremy Kubica <104161096+jeremykubica@users.noreply.github.com> Date: Thu, 14 Sep 2023 10:11:43 -0400 Subject: [PATCH] Update CMakeLists.txt --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 26e00986..4b4b42a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,11 +5,12 @@ endif() project(search LANGUAGES CXX) -# Check if we can compile CUDA on this system. +# Check if we can compile CUDA on this system. We have both the +# CUDA toolkit and the GPU. include(CheckLanguage) check_language(CUDA) -if(CMAKE_CUDA_COMPILER) +if(CMAKE_CUDA_COMPILER AND DEFINED CMAKE_CUDA_ARCHITECTURES) set(HAVE_CUDA 1) enable_language(CUDA) add_definitions(-DHAVE_CUDA=1)