aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/DllExport.hpp
diff options
context:
space:
mode:
authorRob Hughes <robert.hughes@arm.com>2020-01-07 09:40:12 +0000
committerRob Hughes <robert.hughes@arm.com>2020-01-24 11:26:42 +0000
commita91479cdcc4e8206a12f43838b0bbdc6ef7f6bb0 (patch)
tree831e2107c7a6f981f77a6609d812f7178a17066c /src/armnn/DllExport.hpp
parentd466a54e79560f0ccacc6b13cd64e08defbac47c (diff)
downloadarmnn-a91479cdcc4e8206a12f43838b0bbdc6ef7f6bb0.tar.gz
Add ARMNN_DLLEXPORT macro to import/export static data symbols on Windows
Armnn has several static data symbols that are needed by the unit tests. These are now explicitly marked for import when that header is included from the unit test code. See also https://cmake.org/cmake/help/v3.4/prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS.html. Change-Id: I4e71ba659b6321659a1396125b5a9c271578040f Signed-off-by: Robert Hughes <robert.hughes@arm.com>
Diffstat (limited to 'src/armnn/DllExport.hpp')
-rw-r--r--src/armnn/DllExport.hpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/armnn/DllExport.hpp b/src/armnn/DllExport.hpp
new file mode 100644
index 0000000000..227028c9b7
--- /dev/null
+++ b/src/armnn/DllExport.hpp
@@ -0,0 +1,19 @@
+//
+// Copyright © 2020 Arm Ltd. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+#pragma once
+
+#if defined (_MSC_VER)
+
+#ifdef ARMNN_COMPILING_DLL
+#define ARMNN_DLLEXPORT __declspec(dllexport)
+#else
+#define ARMNN_DLLEXPORT __declspec(dllimport)
+#endif
+
+#else
+
+#define ARMNN_DLLEXPORT
+
+#endif \ No newline at end of file