Tests: Fix CudaOnly.WithDefs test on CUDA 9

CUDA 9 dropped support for `compute_20`, so use a different alternative.
This commit is contained in:
Brad King committed 2017-09-29 09:55:11 -04:00
1 parent 6bced4bf76
commit aa640cc20f
1 file changed
+5 -1
+5 -1
View File
@@ -4,7 +4,11 @@ project (CudaOnlyWithDefs CUDA)
#verify that we can pass explicit cuda arch flags
string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_30,code=compute_30")
set(debug_compile_flags --generate-code arch=compute_20,code=sm_20)
if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 9)
set(debug_compile_flags --generate-code arch=compute_32,code=sm_32)
else()
set(debug_compile_flags --generate-code arch=compute_20,code=sm_20)
endif()
if(CMAKE_CUDA_SIMULATE_ID STREQUAL "MSVC")
list(APPEND debug_compile_flags -Xcompiler=-WX)
else()