Skip to content

Commit

Permalink
update cuda requirement to 9.0, fixes microsoft#2791
Browse files Browse the repository at this point in the history
  • Loading branch information
jasjuang committed Feb 15, 2018
1 parent f279e9f commit c61308f
Show file tree
Hide file tree
Showing 2 changed files with 4 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
11 changes: 3 additions & 8 deletions ports/cuda/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,12 @@ 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()

string(REGEX MATCH "V([0-9]+)\\.([0-9]+)\\.([0-9]+)" CUDA_VERSION ${NVCC_OUTPUT})
Expand All @@ -39,7 +34,7 @@ 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 c61308f

Please sign in to comment.