diff options
author | Brad King <brad.king@kitware.com> | 2017-06-21 18:15:23 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-06-21 18:24:11 (GMT) |
commit | 3b75421515835b2fc6713be3015cc3f7324bb5a8 (patch) | |
tree | 6ede896d530967b49b29498ba79b6a8e36a22f3c /Tests | |
parent | f2059585e6302446707560b123c7b785df5f5859 (diff) | |
download | CMake-3b75421515835b2fc6713be3015cc3f7324bb5a8.zip CMake-3b75421515835b2fc6713be3015cc3f7324bb5a8.tar.gz CMake-3b75421515835b2fc6713be3015cc3f7324bb5a8.tar.bz2 |
VS: Improve workaround for CUDA -Xcompiler placement bug
In commit v3.9.0-rc1~431^2~6 (VS: Place CUDA host compiler options in
proper project file fields, 2017-03-07) we worked around a bug in the
CUDA VS integration by dropping `AdditionalCompilerOptions`. However,
this silently drops `-Xcompiler=` options given by the user that don't
map to one of CudaCompile's dedicated settings. Improve the workaround
to instead put the remaining `AdditionalCompilerOptions` into the
`AdditionalOptions` field behind `-Xcompiler=` ourselves.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CudaOnly/SeparateCompilation/CMakeLists.txt | 4 |
1 files changed, 4 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 |