summaryrefslogtreecommitdiffstats
path: root/Tests/CudaOnly
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-06-27 13:18:26 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-06-27 13:18:34 (GMT)
commitdc11a20d7b308f15cc0080f6c14ea06d96dbc2c7 (patch)
tree5199065e13539e3c37a5632aab0d95739d5647c7 /Tests/CudaOnly
parentb8858bd4046958b94b11e794e2a9aab9124414a4 (diff)
parentbbc1f3642cb86ce59908ee33eeb409d7921f73f8 (diff)
downloadCMake-dc11a20d7b308f15cc0080f6c14ea06d96dbc2c7.zip
CMake-dc11a20d7b308f15cc0080f6c14ea06d96dbc2c7.tar.gz
CMake-dc11a20d7b308f15cc0080f6c14ea06d96dbc2c7.tar.bz2
Merge topic 'vs-cuda-fix-flags'
bbc1f364 VS: Fix support for nvcc flags not in our flag table Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1007
Diffstat (limited to 'Tests/CudaOnly')
-rw-r--r--Tests/CudaOnly/SeparateCompilation/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt b/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt
index b946e3f..7ef626f 100644
--- a/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt
+++ b/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt
@@ -16,6 +16,11 @@ set(CMAKE_CUDA_STANDARD 11)
add_library(CUDASeparateLibA STATIC file1.cu file2.cu file3.cu)
if(CMAKE_CUDA_SIMULATE_ID STREQUAL "MSVC")
+ # Test adding a flag that is not in our CUDA flag table for VS.
+ if(NOT CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 8)
+ string(APPEND CMAKE_CUDA_FLAGS " --ftemplate-depth 50")
+ endif()
+ # Test adding a flag that nvcc should pass to the host compiler.
target_compile_options(CUDASeparateLibA PRIVATE -Xcompiler=-bigobj)
endif()