VS CUDA 10.2, No CUDA toolset found
We are trying to port our legacy use of find_package(CUDA)
to a more modern cmake using CUDA as a language, using in one of our list files.
find_program(CMAKE_CUDA_COMPILER NAMES nvcc nvcc.exe HINTS "${CudaRootDir}/bin/" "${CudaRootDir}/nvcc/bin/" NO_DEFAULT_PATH)
include(CheckLanguage)
check_language(CUDA)
enable_language(CUDA)
It seems if we have CUDA (10.2) installed, we can configure without a problem, but if we just use a copy of CUDA, and tell cmake where CMAKE_CUDA_COMPILER
is, it complains with following error;
See also "C:/GAIA_builds/enLfPmZQ/0/simphony/Simphony/build/CMakeFiles/CMakeOutput.log". ERROR:main:CMake Error at C:/Program Files/CMake/share/cmake-3.17/Modules/CMakeDetermineCompilerId.cmake:367 (message): No CUDA toolset found. Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.17/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD) C:/Program Files/CMake/share/cmake-3.17/Modules/CMakeDetermineCUDACompiler.cmake:72 (CMAKE_DETERMINE_COMPILER_ID) CMake/ThirdPartyCuda.cmake:51 (ENABLE_LANGUAGE) Networking/CUDAInfo/CMakeLists.txt:5 (USE_CUDA)
Is there any workaround for this or is my conclusion right that CUDA must be installed (in a standard way)?
Is there some variable like CUDA_ROOT that we should set to make it work?
The reason why we copy CUDA is because have so far treated it like a thirdparty library/tool, which we keep in a repository and every developer checks out the exact same version (via script).