summaryrefslogtreecommitdiffstats
path: root/Tests/CudaOnly/SeparateCompilationTargetObjects/main.cu
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-09-26 13:42:33 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-09-26 13:42:42 (GMT)
commit5a79ea2799e27dc78d71ad71cbf7009416e98076 (patch)
tree1fa0644300a461e87386102a93dbaa149eb77edb /Tests/CudaOnly/SeparateCompilationTargetObjects/main.cu
parent5d32320bf33bc874d0f0e0c651235fe6472c8013 (diff)
parentcd984261e1c2f27c2c716d43f3502c829990685d (diff)
downloadCMake-5a79ea2799e27dc78d71ad71cbf7009416e98076.zip
CMake-5a79ea2799e27dc78d71ad71cbf7009416e98076.tar.gz
CMake-5a79ea2799e27dc78d71ad71cbf7009416e98076.tar.bz2
Merge topic 'cuda_handle_target_objects_in_device_link'
cd984261e1 CUDA: Device linking now uses TARGET_OBJECTS content aa8facefe8 CUDA: Visual Studio propagate objects to device linking Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8829
Diffstat (limited to 'Tests/CudaOnly/SeparateCompilationTargetObjects/main.cu')
-rw-r--r--Tests/CudaOnly/SeparateCompilationTargetObjects/main.cu16
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/CudaOnly/SeparateCompilationTargetObjects/main.cu b/Tests/CudaOnly/SeparateCompilationTargetObjects/main.cu
new file mode 100644
index 0000000..78b10b1
--- /dev/null
+++ b/Tests/CudaOnly/SeparateCompilationTargetObjects/main.cu
@@ -0,0 +1,16 @@
+// main.cu
+#include <iostream>
+
+#ifdef _WIN32
+# define IMPORT __declspec(dllimport)
+#else
+# define IMPORT
+#endif
+
+IMPORT int foo();
+IMPORT int bar();
+
+int main(int argc, char**)
+{
+ return foo() && bar();
+}