[cuda] correct env variables for newer cuda versions (#12244)

* [cuda] correct env variables for newer cuda versions

* Update ports/cuda/CONTROL

Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>

Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
This commit is contained in:
Alexander Neumann 2020-07-09 23:20:45 +02:00 committed by GitHub
parent dbba608d3d
commit 513cac2f62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 5 deletions

View File

@ -1,4 +1,5 @@
Source: cuda Source: cuda
Version: 10.1-1 Version: 10.1
Port-Version: 2
Description: A parallel computing platform and programming model Description: A parallel computing platform and programming model
Homepage: https://developer.nvidia.com/cuda-toolkit Homepage: https://developer.nvidia.com/cuda-toolkit

View File

@ -5,12 +5,18 @@
#note: this port must be kept in sync with CUDNN port: every time one is upgraded, the other must be too #note: this port must be kept in sync with CUDNN port: every time one is upgraded, the other must be too
set(CUDA_REQUIRED_VERSION "10.1.0") set(CUDA_REQUIRED_VERSION "10.1.0")
set(CUDA_PATHS
ENV CUDA_PATH
ENV CUDA_BIN_PATH
ENV CUDA_PATH_V11_0
ENV CUDA_PATH_V10_2
ENV CUDA_PATH_V10_1)
if (VCPKG_TARGET_IS_WINDOWS) if (VCPKG_TARGET_IS_WINDOWS)
find_program(NVCC find_program(NVCC
NAMES nvcc.exe NAMES nvcc.exe
PATHS PATHS
ENV CUDA_PATH ${CUDA_PATHS}
ENV CUDA_BIN_PATH
PATH_SUFFIXES bin bin64 PATH_SUFFIXES bin bin64
DOC "Toolkit location." DOC "Toolkit location."
NO_DEFAULT_PATH NO_DEFAULT_PATH
@ -38,8 +44,7 @@ else()
find_program(NVCC find_program(NVCC
NAMES nvcc NAMES nvcc
PATHS PATHS
ENV CUDA_PATH ${CUDA_PATHS}
ENV CUDA_BIN_PATH
PATHS ${FOUND_PATH} PATHS ${FOUND_PATH}
PATH_SUFFIXES bin bin64 PATH_SUFFIXES bin bin64
DOC "Toolkit location." DOC "Toolkit location."
@ -57,6 +62,7 @@ endif()
if (error_code) if (error_code)
message(STATUS "Executing ${NVCC} --version resulted in error: ${error_code}")
message(FATAL_ERROR "Could not find CUDA. Before continuing, please download and install CUDA (v${CUDA_REQUIRED_VERSION} or higher) from:" message(FATAL_ERROR "Could not find CUDA. Before continuing, please download and install CUDA (v${CUDA_REQUIRED_VERSION} or higher) from:"
"\n https://developer.nvidia.com/cuda-downloads\n") "\n https://developer.nvidia.com/cuda-downloads\n")
endif() endif()

View File

@ -308,6 +308,8 @@ namespace vcpkg
L"CUDA_PATH_V9_1", L"CUDA_PATH_V9_1",
L"CUDA_PATH_V10_0", L"CUDA_PATH_V10_0",
L"CUDA_PATH_V10_1", L"CUDA_PATH_V10_1",
L"CUDA_PATH_V10_2",
L"CUDA_PATH_V11_0",
L"CUDA_TOOLKIT_ROOT_DIR", L"CUDA_TOOLKIT_ROOT_DIR",
// Environmental variable generated automatically by CUDA after installation // Environmental variable generated automatically by CUDA after installation
L"NVCUDASAMPLES_ROOT", L"NVCUDASAMPLES_ROOT",