summaryrefslogtreecommitdiffstats
path: root/Tests/CudaOnly/SeparateCompilation
diff options
context:
space:
mode:
authorRaul Tambre <raul@tambre.ee>2020-03-27 18:52:39 (GMT)
committerRaul Tambre <raul@tambre.ee>2020-04-15 14:55:41 (GMT)
commitf0931b07905a960c7dfbcc90e772219150c24951 (patch)
treedefe47dc5d287e9db57bf33905b927547ec770bd /Tests/CudaOnly/SeparateCompilation
parente98588aabad578a9b33aae05e77f6ec5b3ff2e46 (diff)
downloadCMake-f0931b07905a960c7dfbcc90e772219150c24951.zip
CMake-f0931b07905a960c7dfbcc90e772219150c24951.tar.gz
CMake-f0931b07905a960c7dfbcc90e772219150c24951.tar.bz2
CUDA: Convert tests to use CUDA_ARCHITECTURES
Diffstat (limited to 'Tests/CudaOnly/SeparateCompilation')
-rw-r--r--Tests/CudaOnly/SeparateCompilation/CMakeLists.txt4
1 files changed, 1 insertions, 3 deletions
diff --git a/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt b/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt
index c1bd64a..586be81 100644
--- a/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt
+++ b/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt
@@ -9,9 +9,7 @@ project (SeparateCompilation CUDA)
#and executables.
#We complicate the matter by also testing that multiple static libraries
#all containing cuda separable compilation code links properly
-string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_30,code=\\\"compute_30,sm_30,sm_35\\\"")
-string(APPEND CMAKE_CUDA_FLAGS " --generate-code=arch=compute_50,code=[compute_50,sm_50,sm_52]")
-
+set(CMAKE_CUDA_ARCHITECTURES 30 35 50 52)
set(CMAKE_CUDA_SEPARABLE_COMPILATION ON)
add_library(CUDASeparateLibA STATIC file1.cu file2.cu file3.cu)
target_compile_features(CUDASeparateLibA PRIVATE cuda_std_11)