summaryrefslogtreecommitdiffstats
path: root/Tests/CudaOnly
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-06-26 14:22:17 (GMT)
committerBrad King <brad.king@kitware.com>2017-06-27 13:08:50 (GMT)
commitbbc1f3642cb86ce59908ee33eeb409d7921f73f8 (patch)
treec7d460c116f70f0f37d08532b849236eceb66293 /Tests/CudaOnly
parent3b75421515835b2fc6713be3015cc3f7324bb5a8 (diff)
downloadCMake-bbc1f3642cb86ce59908ee33eeb409d7921f73f8.zip
CMake-bbc1f3642cb86ce59908ee33eeb409d7921f73f8.tar.gz
CMake-bbc1f3642cb86ce59908ee33eeb409d7921f73f8.tar.bz2
VS: Fix support for nvcc flags not in our flag table
The change in commit v3.9.0-rc4~3^2 (VS: Improve workaround for CUDA -Xcompiler placement bug, 2017-06-21) accidentally appended to the `AdditionalOptions` as if it were a `;`-separated list, but it is actually a command-line string. Append with a space instead. While at it, fix the same problem for the `AdditionalOptions` added to `CudaLink` by commit v3.9.0-rc3~1^2 (CUDA: When linking device code suppress CUDA 8.0+ deprecation warnings, 2017-06-09). Fixes: #17008
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 f42324e..3d4a170 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()