Skip to content

Commit

Permalink
COMP: provide nvcc location to CMake package CUDAToolkit
Browse files Browse the repository at this point in the history
nvcc is found by find_language(CUDA) but the language is not immediately
set to let cmake check CMake and CUDA version
  • Loading branch information
Simon Rit committed Oct 14, 2021
1 parent b9ff8dc commit 2a05f38
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions itk-module-init.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ check_language(CUDA)
# Determine default value for RTK_USE_CUDA
set(RTK_USE_CUDA_DEFAULT OFF)
if (CMAKE_CUDA_COMPILER)
set(CUDAToolkit_NVCC_EXECUTABLE ${CMAKE_CUDA_COMPILER})
find_package(CUDAToolkit)
if(NOT CUDAToolkit_FOUND)
message(WARNING "CUDAToolkit not found (available since CMake v3.17). RTK_USE_CUDA set to OFF.")
Expand Down

0 comments on commit 2a05f38

Please sign in to comment.