Skip to content
Snippets Groups Projects
Unverified Commit f2107b4b authored by Thorsten Hater's avatar Thorsten Hater Committed by GitHub
Browse files

Include CMAKE+CUDA iff NVCC is needed. (#1855)

parent 19718283
No related branches found
No related tags found
No related merge requests found
......@@ -97,7 +97,6 @@ option(ARB_WITH_PYTHON "enable Python front end" OFF)
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
include(GitSubmodule) # required for check_git_submodule
include(ErrorTarget) # reguired for add_error_target
include(FindCUDAToolkit)
# Set release as the default build type (CMake default is debug.)
......@@ -110,6 +109,7 @@ endif()
# Add CUDA as a language if GPU support requested. (This has to be set early so
# as to enable CUDA tests in generator expressions.)
if(ARB_GPU STREQUAL "cuda")
include(FindCUDAToolkit)
set(ARB_WITH_NVCC TRUE)
# CMake 3.18 and later set the default CUDA architecture for
# each target according to CMAKE_CUDA_ARCHITECTURES.
......@@ -128,6 +128,7 @@ if(ARB_GPU STREQUAL "cuda")
endif()
endif()
elseif(ARB_GPU STREQUAL "cuda-clang")
include(FindCUDAToolkit)
set(ARB_WITH_CUDA_CLANG TRUE)
enable_language(CUDA)
elseif(ARB_GPU STREQUAL "hip")
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment