summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2016-03-19 11:09:09 +0100
committerCedric Nugteren <web@cedricnugteren.nl>2016-03-19 11:09:09 +0100
commitd9356954176eba875138e38b5cf0fb131e1ac925 (patch)
tree7844472ae9025bf0024c303f9de287910b8f2ecd /include
parent918797735da29f102f027b9dc19dccc751950c76 (diff)
Added __declspec(dllexport) to create a DLL on Windows
Diffstat (limited to 'include')
-rw-r--r--include/internal/public_api.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/internal/public_api.h b/include/internal/public_api.h
new file mode 100644
index 00000000..ed3f1e29
--- /dev/null
+++ b/include/internal/public_api.h
@@ -0,0 +1,32 @@
+
+// =================================================================================================
+// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
+// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
+// width of 100 characters per line.
+//
+// Author(s):
+// Cedric Nugteren <www.cedricnugteren.nl>
+//
+// This file provides macro's to define the public API. This is needed when building a Windows DLL.
+//
+// =================================================================================================
+
+#ifndef CLBLAST_PUBLIC_API_H_
+#define CLBLAST_PUBLIC_API_H_
+
+namespace clblast {
+// =================================================================================================
+
+// Exports library functions under Windows when building a DLL. See also:
+// https://msdn.microsoft.com/en-us/library/a90k134d.aspx
+#ifdef _WIN32
+ #define PUBLIC_API __declspec(dllexport)
+#else
+ #define PUBLIC_API
+#endif
+
+// =================================================================================================
+} // namespace clblast
+
+// CLBLAST_PUBLIC_API_H_
+#endif \ No newline at end of file