From aa640cc20f55589796484737a7157469ec30623d Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 29 Sep 2017 09:53:56 -0400 Subject: Tests: Fix CudaOnly.WithDefs test on CUDA 9 CUDA 9 dropped support for `compute_20`, so use a different alternative. --- Tests/CudaOnly/WithDefs/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Tests/CudaOnly/WithDefs/CMakeLists.txt b/Tests/CudaOnly/WithDefs/CMakeLists.txt index 0bc4e5c..9b82366 100644 --- a/Tests/CudaOnly/WithDefs/CMakeLists.txt +++ b/Tests/CudaOnly/WithDefs/CMakeLists.txt @@ -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() -- cgit v0.12