Skip to content
Snippets Groups Projects
Commit 293ef762 authored by Axel Naumann's avatar Axel Naumann
Browse files

[cmake] Handle missing CUDA gracefully

parent 4e5cae5a
No related branches found
No related tags found
No related merge requests found
...@@ -1371,13 +1371,18 @@ endif() ...@@ -1371,13 +1371,18 @@ endif()
#---Check for CUDA----------------------------------------------------------------------- #---Check for CUDA-----------------------------------------------------------------------
if(cuda OR tmva-gpu) if(cuda OR tmva-gpu)
find_package(CUDA REQUIRED) find_package(CUDA)
if(NOT DEFINED CMAKE_CUDA_STANDARD) if(CUDA_FOUND)
set(CMAKE_CUDA_STANDARD ${CMAKE_CXX_STANDARD}) if(NOT DEFINED CMAKE_CUDA_STANDARD)
set(CMAKE_CUDA_STANDARD ${CMAKE_CXX_STANDARD})
endif()
enable_language(CUDA)
elseif(fail-on-missing)
message(FATAL_ERROR "CUDA not found. Ensure that the installation of CUDA is in the CMAKE_PREFIX_PATH")
endif() endif()
enable_language(CUDA)
endif() endif()
#---TMVA and its dependencies------------------------------------------------------------ #---TMVA and its dependencies------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment