From fdbb6ae856e37b881fb706eab8e8fe4d6cd4c024 Mon Sep 17 00:00:00 2001 From: Philip Hyunsu Cho Date: Wed, 27 May 2020 16:18:18 -0700 Subject: [PATCH] Require CUDA 10.0+ in CMake build (#5718) --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 10e3dbfc63de..b42f5775fb6e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -92,6 +92,9 @@ if (USE_CUDA) message(STATUS "Configured CUDA host compiler: ${CMAKE_CUDA_HOST_COMPILER}") enable_language(CUDA) + if (${CMAKE_CUDA_COMPILER_VERSION} VERSION_LESS 10.0) + message(FATAL_ERROR "CUDA version must be at least 10.0!") + endif() set(GEN_CODE "") format_gencode_flags("${GPU_COMPUTE_VER}" GEN_CODE) message(STATUS "CUDA GEN_CODE: ${GEN_CODE}")