Skip to content

Commit

Permalink
update cuda requirement to 9.0, fixes microsoft#2791 (microsoft#2802)
Browse files Browse the repository at this point in the history
* update cuda requirement to 9.0, fixes microsoft#2791

* [cuda] Restore sample version blob
  • Loading branch information
jasjuang authored and ras0219-msft committed Feb 16, 2018
1 parent f279e9f commit d5cb490
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion ports/cuda/CONTROL
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Source: cuda
Version: 8.0-1
Version: 9.0
Description: A parallel computing platform and programming model
16 changes: 8 additions & 8 deletions ports/cuda/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,26 @@ if (NVCC)
RESULT_VARIABLE error_code)
endif()

# Sample output
# NVIDIA (R) Cuda compiler driver
# Copyright (c) 2005-2016 NVIDIA Corporation
# Built on Sat_Sep__3_19:05:48_CDT_2016
# Cuda compilation tools, release 8.0, V8.0.44
set(CUDA_REQUIRED_VERSION "V8.0.0")
set(CUDA_REQUIRED_VERSION "V9.0.0")

if (error_code)
message(FATAL_ERROR "Could not find CUDA. Before continuing, please download and install CUDA (${CUDA_REQUIRED_VERSION} or higher) from:"
"\n https://developer.nvidia.com/cuda-downloads\n"
"\nAlso ensure vcpkg has been rebuilt with the latest version (v0.0.79 or later)")
"\nAlso ensure vcpkg has been rebuilt with the latest version (v0.0.104 or later)")
endif()

# Sample output:
# NVIDIA (R) Cuda compiler driver
# Copyright (c) 2005-2016 NVIDIA Corporation
# Built on Sat_Sep__3_19:05:48_CDT_2016
# Cuda compilation tools, release 8.0, V8.0.44
string(REGEX MATCH "V([0-9]+)\\.([0-9]+)\\.([0-9]+)" CUDA_VERSION ${NVCC_OUTPUT})
message(STATUS "Found CUDA ${CUDA_VERSION}")
set(CUDA_VERSION_MAJOR ${CMAKE_MATCH_1})
#set(CUDA_VERSION_MINOR ${CMAKE_MATCH_2})
#set(CUDA_VERSION_PATCH ${CMAKE_MATCH_3})

if (CUDA_VERSION_MAJOR LESS 8)
if (CUDA_VERSION_MAJOR LESS 9)
message(FATAL_ERROR "CUDA ${CUDA_VERSION} but ${CUDA_REQUIRED_VERSION} is required. Please download and install a more recent version of CUDA from:"
"\n https://developer.nvidia.com/cuda-downloads\n")
endif()
Expand Down

0 comments on commit d5cb490

Please # to comment.