Skip to content
Snippets Groups Projects
Commit e9968cdc authored by Guilherme Amadio's avatar Guilherme Amadio
Browse files

Let CMake handle CUDA requirements

CMake should already know which versions of CUDA are required
depending on which standard is being used. The current setup
forbids compiling with C++17 for the host code and C++14 for
CUDA. This will require modifications in TMVA to work, but
relaxing this restriction will at least allow compilation of
ROOT with CUDA and C++17 when it's supported by Nvidia.
parent 5e0a9cce
Branches
Tags
No related merge requests found
......@@ -1371,14 +1371,12 @@ endif()
#---Check for CUDA-----------------------------------------------------------------------
if(cuda OR tmva-gpu)
if(CMAKE_CXX_STANDARD EQUAL 11)
find_package(CUDA 7.5)
elseif(CMAKE_CXX_STANDARD EQUAL 14)
message(STATUS "Detected request for c++14, requiring minimum version CUDA 9.0 (default 7.5)")
find_package(CUDA 9.0)
else()
message(FATAL_ERROR "CUDA not supported with C++${CMAKE_CXX_STANDARD}")
find_package(CUDA REQUIRED)
if(NOT DEFINED CMAKE_CUDA_STANDARD)
set(CMAKE_CUDA_STANDARD ${CMAKE_CXX_STANDARD})
endif()
enable_language(CUDA)
endif()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment