mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-02 20:00:38 -06:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user