diff options
| author | Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> | 2020-07-09 23:20:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-09 14:20:45 -0700 |
| commit | 513cac2f62ef637fabc7173f156955bac8482cb9 (patch) | |
| tree | 4c2b700ecf490dc9a793da72fdcb2674edc3f558 | |
| parent | dbba608d3df3dd6b5258ef46c98f0555b807bd8d (diff) | |
| download | vcpkg-513cac2f62ef637fabc7173f156955bac8482cb9.tar.gz vcpkg-513cac2f62ef637fabc7173f156955bac8482cb9.zip | |
[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>
| -rw-r--r-- | ports/cuda/CONTROL | 3 | ||||
| -rw-r--r-- | ports/cuda/portfile.cmake | 14 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg/base/system.process.cpp | 2 |
3 files changed, 14 insertions, 5 deletions
diff --git a/ports/cuda/CONTROL b/ports/cuda/CONTROL index cf909e0ce..00b422df8 100644 --- a/ports/cuda/CONTROL +++ b/ports/cuda/CONTROL @@ -1,4 +1,5 @@ Source: cuda -Version: 10.1-1 +Version: 10.1 +Port-Version: 2 Description: A parallel computing platform and programming model Homepage: https://developer.nvidia.com/cuda-toolkit diff --git a/ports/cuda/portfile.cmake b/ports/cuda/portfile.cmake index 63c761a1a..0dd768e29 100644 --- a/ports/cuda/portfile.cmake +++ b/ports/cuda/portfile.cmake @@ -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 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) find_program(NVCC NAMES nvcc.exe PATHS - ENV CUDA_PATH - ENV CUDA_BIN_PATH + ${CUDA_PATHS} PATH_SUFFIXES bin bin64 DOC "Toolkit location." NO_DEFAULT_PATH @@ -38,8 +44,7 @@ else() find_program(NVCC NAMES nvcc PATHS - ENV CUDA_PATH - ENV CUDA_BIN_PATH + ${CUDA_PATHS} PATHS ${FOUND_PATH} PATH_SUFFIXES bin bin64 DOC "Toolkit location." @@ -57,6 +62,7 @@ endif() 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:" "\n https://developer.nvidia.com/cuda-downloads\n") endif() diff --git a/toolsrc/src/vcpkg/base/system.process.cpp b/toolsrc/src/vcpkg/base/system.process.cpp index d709fdb60..2feaa3d74 100644 --- a/toolsrc/src/vcpkg/base/system.process.cpp +++ b/toolsrc/src/vcpkg/base/system.process.cpp @@ -308,6 +308,8 @@ namespace vcpkg L"CUDA_PATH_V9_1", L"CUDA_PATH_V10_0", L"CUDA_PATH_V10_1", + L"CUDA_PATH_V10_2", + L"CUDA_PATH_V11_0", L"CUDA_TOOLKIT_ROOT_DIR", // Environmental variable generated automatically by CUDA after installation L"NVCUDASAMPLES_ROOT", |
