Only warn abou CUDA version if CUDA was actually found.

This commit is contained in:
Markus Blatt 2020-04-15 14:21:36 +02:00
parent 340bad4b17
commit 695e6c9449

View File

@ -111,7 +111,7 @@ if(NOT CMAKE_DISABLE_FIND_PACKAGE_CUDA AND
# Hence we call it unconditionally
# The WellContributions kernel uses __shfl_down_sync, which was introduced in CUDA 9.0
find_package(CUDA)
if(CUDA_VERSION VERSION_LESS "9.0")
if(CUDA_FOUND AND CUDA_VERSION VERSION_LESS "9.0")
set(CUDA_FOUND OFF)
message(WARNING "Deactivating CUDA as we require version 9.0 or newer."
" Found only CUDA version ${CUDA_VERSION}.")