Open PhilLab opened 4 years ago
del or comment str set(CUDA_REQUIRED_VERSION "10.1.0")
@Voskrese Thanks for the lightning-fast response. However, I am unsure if this is the actual problem here, as the "10.1.0" would actually be the version I need. In the portfile, this just seems to be the minor version vcpkg is working with.
The cmake error about mismatching versions does not fail in the port file - then, the message would be:
CUDA ${CUDA_VERSION} found, but v${CUDA_REQUIRED_VERSION} is required. Please download and install a more recent version...
but rather when I use find_package(CUDA 10.1 EXACT REQUIRED)
in my own script. It then says
Could NOT find CUDA: Found unsuitable version "11.0", but required is exact version "10.1" (found C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.0)
@Neumann-A Could you please take a look?
Thanks.
The CUDA port just verifies that CUDA exists nothing more.
find_package(CUDA 10.1 EXACT REQUIRED)
For that somebody as to dig down into the CUDA module and check weather or not it supports searching for other versions. It could be that it only uses CUDA_PATH. Thus you just need to set CUDA_PATH to the correct toolset path for the CUDA version you want to use.
in port file
vcpkg_add_to_path(PREPEND $ENV{CUDA_PATH}/bin)
or vcpkg_add_to_path(PREPEND $ENV{CUDA_PATH_V10_0}/bin)
or ...
...
set(CMAKE_CUDA_COMPILER_WORKS TRUE)
vcpkg_add_to_path(PREPEND $ENV{CUDA_PATH}/bin)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
...
Is your feature request related to a problem? Please describe. We have an exact version requirement for NVIDIA CUDA:
However, the current port file only reports the latest version, even if older versions are installed:
I have available on my system:
Proposed solution The port file should not only find the latest version but if an exact one was requested, return it
Describe alternatives you've considered
Additional context