summaryrefslogtreecommitdiffstats
path: root/Tests/CudaOnly
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-09-29 13:53:56 (GMT)
committerBrad King <brad.king@kitware.com>2017-09-29 13:55:11 (GMT)
commitaa640cc20f55589796484737a7157469ec30623d (patch)
tree037a20d332b982adfb8a9996648bf67354d2cd8f /Tests/CudaOnly
parent6bced4bf76e33b5c80a9a821d99ac933afa6ac03 (diff)
downloadCMake-aa640cc20f55589796484737a7157469ec30623d.zip
CMake-aa640cc20f55589796484737a7157469ec30623d.tar.gz
CMake-aa640cc20f55589796484737a7157469ec30623d.tar.bz2
Tests: Fix CudaOnly.WithDefs test on CUDA 9
CUDA 9 dropped support for `compute_20`, so use a different alternative.
Diffstat (limited to 'Tests/CudaOnly')
-rw-r--r--Tests/CudaOnly/WithDefs/CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
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()