RTK
RTK copied to clipboard
Issues linking while linking CUDA after RTK v2.3.0 CMake refactoring
Issue presented when fast-forwarding to tag v2.3.0 (from #413 merge) and regenerating the CMake project. In particular, while setting up the project for Visual studio 2017 I get the following error:
Could not find a package configuration file provided by "CUDAToolkit" with any of the following names: CUDAToolkitConfig.cmake cudatoolkit-config.cmake
I'm using CUDA v10.1 and linking against ITK v5.2 using CMake v3.14.3.
I suppose this may be due to my CMake version being outdated since FINDCudaToolkit is referenced from CMake v3.17. onwards.
In theory you should have seen a warning CUDAToolkit not found (available since CMake v3.17). RTK_USE_CUDA set to OFF.
Indeed, we no longer support cmake versions older than 3.17 with Cuda...
In theory you should have seen a warning
CUDAToolkit not found (available since CMake v3.17). RTK_USE_CUDA set to OFF.
Indeed, we no longer support cmake versions older than 3.17 with Cuda...
Yes! now I was able to replicate the warning popping up. It wasn't showing until I was setting CMAKE_CUDA_COMPILER
to my bin/nvcc
path.
So it's surely working as intended, but I don't get the warning if I set RTK_USE_CUDA
to true and configure. In that case I simply get :
CMake Error at C:/Program Files/CMake/share/cmake-3.14/Modules/CMakeDetermineCompilerId.cmake:285 (message): No CUDA toolset found. Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.14/Modules/CMakeDetermineCompilerId.cmake:31 (CMAKE_DETERMINE_COMPILER_ID_BUILD) C:/Program Files/CMake/share/cmake-3.14/Modules/CMakeDetermineCUDACompiler.cmake:72 (CMAKE_DETERMINE_COMPILER_ID) itk-module-init.cmake:36 (enable_language) CMakeLists.txt:109 (include)
I feel like this is particularly inconsequential, sorry for wasting your time!
In theory you should have seen a warning
CUDAToolkit not found (available since CMake v3.17). RTK_USE_CUDA set to OFF.
Indeed, we no longer support cmake versions older than 3.17 with Cuda...Yes! now I was able to replicate the warning popping up. It wasn't showing until I was setting
CMAKE_CUDA_COMPILER
to mybin/nvcc
path. So it's surely working as intended, but I don't get the warning if I setRTK_USE_CUDA
to true and configure. In that case I simply get :CMake Error at C:/Program Files/CMake/share/cmake-3.14/Modules/CMakeDetermineCompilerId.cmake:285 (message): No CUDA toolset found. Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.14/Modules/CMakeDetermineCompilerId.cmake:31 (CMAKE_DETERMINE_COMPILER_ID_BUILD) C:/Program Files/CMake/share/cmake-3.14/Modules/CMakeDetermineCUDACompiler.cmake:72 (CMAKE_DETERMINE_COMPILER_ID) itk-module-init.cmake:36 (enable_language) CMakeLists.txt:109 (include)
I feel like this is particularly inconsequential, sorry for wasting your time!
I updated CMake to the latest release, but it seems that I still have issues with the CUDA toolkit identification:
CMake Error at C:/Program Files/CMake/share/cmake-3.22/Modules/CMakeDetermineCompilerId.cmake:463 (message): No CUDA toolset found. Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.22/Modules/CMakeDetermineCompilerId.cmake:6 (CMAKE_DETERMINE_COMPILER_ID_BUILD) C:/Program Files/CMake/share/cmake-3.22/Modules/CMakeDetermineCompilerId.cmake:48 (__determine_compiler_id_test) C:/Program Files/CMake/share/cmake-3.22/Modules/CMakeDetermineCUDACompiler.cmake:298 (CMAKE_DETERMINE_COMPILER_ID) itk-module-init.cmake:36 (enable_language) CMakeLists.txt:109 (include)