Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions itk-module-init.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,17 @@ if(CMAKE_CUDA_COMPILER)
endif()

# Configure CUDA compilation options
option(
CUDACOMMON_CUDA_VERSION
"Specify the exact CUDA version that must be used for CudaCommon"
)
if( NOT CUDACOMMON_CUDA_VERSION)
set(CUDACOMMON_CUDA_VERSION ${CUDAToolkit_VERSION} CACHE STRING "Specify the exact CUDA version that must be used for CudaCommon")
else()
set(CUDACOMMON_CUDA_VERSION ${CUDACOMMON_CUDA_VERSION} CACHE STRING "Specify the exact CUDA version that must be used for CudaCommon")
endif()
mark_as_advanced(CUDACOMMON_CUDA_VERSION)

if(CUDAToolkit_FOUND)
enable_language(CUDA)
set(CMAKE_CUDA_RUNTIME_LIBRARY Static)
if(CUDACOMMON_CUDA_VERSION)
find_package(CUDAToolkit EXACT ${CUDACOMMON_CUDA_VERSION})
find_package(CUDAToolkit EXACT ${CUDACOMMON_CUDA_VERSION} REQUIRED)
endif()
endif()
Loading