diff options
author | Brad King <brad.king@kitware.com> | 2017-06-21 18:24:23 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-06-21 18:24:23 (GMT) |
commit | 3d9924447702df5a85977041f301aaab3fbe7215 (patch) | |
tree | 09392fc4a35c06de934163df86c4008c8300d9cf /Tests | |
parent | fff7d8c666e436d9a1a33865d87668e9cf6ff0da (diff) | |
parent | 3b75421515835b2fc6713be3015cc3f7324bb5a8 (diff) | |
download | CMake-3d9924447702df5a85977041f301aaab3fbe7215.zip CMake-3d9924447702df5a85977041f301aaab3fbe7215.tar.gz CMake-3d9924447702df5a85977041f301aaab3fbe7215.tar.bz2 |
Merge branch 'vs-cuda-fix-flags' into release-3.9
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CudaOnly/SeparateCompilation/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tests/CudaOnly/WithDefs/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Tests/CudaOnly/WithDefs/main.notcu | 4 |
3 files changed, 9 insertions, 0 deletions
diff --git a/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt b/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt index 0a2542a..f42324e 100644 --- a/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt +++ b/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt @@ -15,6 +15,10 @@ set(CMAKE_CUDA_STANDARD 11) add_library(CUDASeparateLibA STATIC file1.cu file2.cu file3.cu) +if(CMAKE_CUDA_SIMULATE_ID STREQUAL "MSVC") + target_compile_options(CUDASeparateLibA PRIVATE -Xcompiler=-bigobj) +endif() + #Having file4/file5 in a shared library causes serious problems #with the nvcc linker and it will generate bad entries that will #cause a segv when trying to run the executable diff --git a/Tests/CudaOnly/WithDefs/CMakeLists.txt b/Tests/CudaOnly/WithDefs/CMakeLists.txt index 38f2a44..e25f141 100644 --- a/Tests/CudaOnly/WithDefs/CMakeLists.txt +++ b/Tests/CudaOnly/WithDefs/CMakeLists.txt @@ -28,6 +28,7 @@ add_executable(CudaOnlyWithDefs ${main}) target_compile_options(CudaOnlyWithDefs PRIVATE + -Xcompiler=-DHOST_DEFINE $<$<CONFIG:DEBUG>:$<BUILD_INTERFACE:${debug_compile_flags}>> ) diff --git a/Tests/CudaOnly/WithDefs/main.notcu b/Tests/CudaOnly/WithDefs/main.notcu index 80ed3a5..d2eff3f 100644 --- a/Tests/CudaOnly/WithDefs/main.notcu +++ b/Tests/CudaOnly/WithDefs/main.notcu @@ -2,6 +2,10 @@ #include <cuda_runtime.h> #include <iostream> +#ifndef HOST_DEFINE +#error "HOST_DEFINE not defined!" +#endif + #ifndef PACKED_DEFINE #error "PACKED_DEFINE not defined!" #endif |