Fix CUDA version check to allow versions 9.0 or newer.

This commit is contained in:
Markus Blatt 2020-03-20 14:36:24 +01:00
parent c0a82ff335
commit 74051ebf01

View File

@ -47,7 +47,12 @@ if(NOT CMAKE_DISABLE_FIND_PACKAGE_CUDA AND
# only easy way to determine the cublas and cusparse libraries.
# Hence we call it unconditionally
# The WellContributions kernel uses __shfl_down_sync, which was introduced in CUDA 9.0
find_package(CUDA 9.0)
find_package(CUDA)
if(CUDA_VERSION VERSION_LESS "9.7")
set(CUDA_FOUND OFF)
message(WARNING "Deactivating CUDA as we require version 9.0 or newer."
" Found only CUDA version ${CUDA_VERSION}.")
endif()
endif()
if(CUDA_FOUND)