summaryrefslogtreecommitdiffstats
path: root/Tests/Cuda/SeparableCompCXXOnly/main.cpp
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2020-01-07 16:49:09 (GMT)
committerBrad King <brad.king@kitware.com>2020-01-09 16:02:17 (GMT)
commit071c4f1a2a44de1e3e9d2c5ce22a661edf334f8b (patch)
tree03a09c76b2393ac69c4f2bea10c87afa26111807 /Tests/Cuda/SeparableCompCXXOnly/main.cpp
parent5b43aa775507c974284bbae2e6bd13e11caec80d (diff)
downloadCMake-071c4f1a2a44de1e3e9d2c5ce22a661edf334f8b.zip
CMake-071c4f1a2a44de1e3e9d2c5ce22a661edf334f8b.tar.gz
CMake-071c4f1a2a44de1e3e9d2c5ce22a661edf334f8b.tar.bz2
CUDA: Do not device link if target has no CUDA usage
When CUDA is enabled, and a pure non-CUDA target has CMAKE_CUDA_SEPARABLE_COMPILATION enabled, don't actually perform the device linking step, as it will fail. A target that has CMAKE_CUDA_SEPARABLE_COMPILATION enabled must also have CUDA usage (either itself, or something it links to). Fixes: #20182
Diffstat (limited to 'Tests/Cuda/SeparableCompCXXOnly/main.cpp')
-rw-r--r--Tests/Cuda/SeparableCompCXXOnly/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/Cuda/SeparableCompCXXOnly/main.cpp b/Tests/Cuda/SeparableCompCXXOnly/main.cpp
new file mode 100644
index 0000000..8135246
--- /dev/null
+++ b/Tests/Cuda/SeparableCompCXXOnly/main.cpp
@@ -0,0 +1,5 @@
+
+int main(int, char const* [])
+{
+ return 0;
+}