mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[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:
parent
dbba608d3d
commit
513cac2f62
@ -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
|
||||
|
@ -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()
|
||||
|
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user