summaryrefslogtreecommitdiff
path: root/Tests/Cuda
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-02-14 15:09:55 -0500
committerBrad King <brad.king@kitware.com>2017-02-15 11:12:09 -0500
commitd7c80f60362cbc40216fab67318d94988030315c (patch)
tree85aee2b8ba402266dd8da14740e8a6ca7be7ca00 /Tests/Cuda
parent272c348d5a1c3f713586e05e0d73fd18441f7bb2 (diff)
downloadcmake-d7c80f60362cbc40216fab67318d94988030315c.tar.gz
CUDA: Fix test cases to not override CUDA flags
Append to `CMAKE_CUDA_FLAGS` instead of overwriting it.
Diffstat (limited to 'Tests/Cuda')
-rw-r--r--Tests/Cuda/Complex/CMakeLists.txt2
-rw-r--r--Tests/Cuda/ProperLinkFlags/CMakeLists.txt2
-rw-r--r--Tests/Cuda/WithC/CMakeLists.txt2
3 files changed, 3 insertions, 3 deletions
diff --git a/Tests/Cuda/Complex/CMakeLists.txt b/Tests/Cuda/Complex/CMakeLists.txt
index 9a3703a9c4..bff7d076d0 100644
--- a/Tests/Cuda/Complex/CMakeLists.txt
+++ b/Tests/Cuda/Complex/CMakeLists.txt
@@ -15,7 +15,7 @@ project (CudaComplex CXX CUDA)
#and also bulding cpp targets that need cuda implicit libraries
#verify that we can pass explicit cuda arch flags
-set(CMAKE_CUDA_FLAGS "-gencode arch=compute_30,code=compute_30")
+string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_30,code=compute_30")
set(CMAKE_CUDA_STANDARD 11)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CUDA_STANDARD_REQUIRED TRUE)
diff --git a/Tests/Cuda/ProperLinkFlags/CMakeLists.txt b/Tests/Cuda/ProperLinkFlags/CMakeLists.txt
index a9eb8bdcf4..b6e0e394b4 100644
--- a/Tests/Cuda/ProperLinkFlags/CMakeLists.txt
+++ b/Tests/Cuda/ProperLinkFlags/CMakeLists.txt
@@ -9,7 +9,7 @@ project (ProperLinkFlags CUDA CXX)
#Specify a set of valid CUDA flags and an invalid set of CXX flags ( for CUDA )
#to make sure we don't use the CXX flags when linking CUDA executables
-set(CMAKE_CUDA_FLAGS "-arch=sm_35 --use_fast_math")
+string(APPEND CMAKE_CUDA_FLAGS " -arch=sm_35 --use_fast_math")
set(CMAKE_CXX_FLAGS "-Wall")
set(CMAKE_CXX_STANDARD 11)
diff --git a/Tests/Cuda/WithC/CMakeLists.txt b/Tests/Cuda/WithC/CMakeLists.txt
index 7596804bfc..1f25ab43ed 100644
--- a/Tests/Cuda/WithC/CMakeLists.txt
+++ b/Tests/Cuda/WithC/CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.7)
project(CudaComplex CUDA C)
-set(CMAKE_CUDA_FLAGS "-gencode arch=compute_30,code=compute_30")
+string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_30,code=compute_30")
add_executable(CudaWithC main.c cuda.cu)