Fix compilation error when using CUDA Toolkit 9

Compute capabilities 2.0 and 2.1 (Fermi cards) were removed from
CUDA Toolkit 9. Build CUDA kernels of compute capability 3.0 when
CUDA Toolkit 9 is used.
This commit is contained in:
Sergey Sharybin 2018-07-03 14:36:21 +02:00
parent 5b297d8866
commit f255b91a20

View File

@ -515,8 +515,10 @@ if(CUDA_FOUND)
if (NOT DEFINED OSD_CUDA_NVCC_FLAGS)
if (CUDA_VERSION_MAJOR LESS 6)
set( OSD_CUDA_NVCC_FLAGS --gpu-architecture compute_11 )
else()
elseif (CUDA_VERSION_MAJOR LESS 9)
set( OSD_CUDA_NVCC_FLAGS --gpu-architecture compute_20 )
else()
set( OSD_CUDA_NVCC_FLAGS --gpu-architecture compute_30 )
endif()
endif()
endif()