summaryrefslogtreecommitdiffstats
path: root/Tests/CudaOnly/StaticRuntimePlusToolkit/shared.cu
diff options
context:
space:
mode:
authorRobert Maynard <rmaynard@nvidia.com>2022-11-22 17:42:35 (GMT)
committerRobert Maynard <rmaynard@nvidia.com>2022-11-23 14:27:42 (GMT)
commit54d80440840edd14a0c9f7324525dc0b0f4c3808 (patch)
treebd1d03f941f625cbe0b5f80fca031591d0637468 /Tests/CudaOnly/StaticRuntimePlusToolkit/shared.cu
parent9278ae6f1b80e2694300b5eed2d3dde6cc43b167 (diff)
downloadCMake-54d80440840edd14a0c9f7324525dc0b0f4c3808.zip
CMake-54d80440840edd14a0c9f7324525dc0b0f4c3808.tar.gz
CMake-54d80440840edd14a0c9f7324525dc0b0f4c3808.tar.bz2
Tests: Don't presume that Linux CUDA Toolkits provide static libs
Diffstat (limited to 'Tests/CudaOnly/StaticRuntimePlusToolkit/shared.cu')
-rw-r--r--Tests/CudaOnly/StaticRuntimePlusToolkit/shared.cu10
1 files changed, 9 insertions, 1 deletions
diff --git a/Tests/CudaOnly/StaticRuntimePlusToolkit/shared.cu b/Tests/CudaOnly/StaticRuntimePlusToolkit/shared.cu
index 9967b66..f3c3dbc 100644
--- a/Tests/CudaOnly/StaticRuntimePlusToolkit/shared.cu
+++ b/Tests/CudaOnly/StaticRuntimePlusToolkit/shared.cu
@@ -1,8 +1,16 @@
+#ifdef _WIN32
+# define IMPORT __declspec(dllimport)
+# define EXPORT __declspec(dllexport)
+#else
+# define IMPORT
+# define EXPORT
+#endif
+
int curand_main();
int nppif_main();
-int shared_version()
+EXPORT int shared_version()
{
return curand_main() == 0 && nppif_main() == 0;
}