summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-10-02 11:57:11 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-10-02 11:57:20 (GMT)
commit1f560b08d4a0dea44a8fbee4c54425b6c143c404 (patch)
tree0175b6952c8ae73baf5d9d6635cf1746dd3ca2ce
parent41bf791a68c000345fef16188b909348f2932bdb (diff)
parentaa640cc20f55589796484737a7157469ec30623d (diff)
downloadCMake-1f560b08d4a0dea44a8fbee4c54425b6c143c404.zip
CMake-1f560b08d4a0dea44a8fbee4c54425b6c143c404.tar.gz
CMake-1f560b08d4a0dea44a8fbee4c54425b6c143c404.tar.bz2
Merge topic 'cuda-9-tests'
aa640cc2 Tests: Fix CudaOnly.WithDefs test on CUDA 9 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1329
-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()