diff options
author | Rob Hughes <robert.hughes@arm.com> | 2020-01-07 09:40:12 +0000 |
---|---|---|
committer | Rob Hughes <robert.hughes@arm.com> | 2020-01-24 11:26:42 +0000 |
commit | a91479cdcc4e8206a12f43838b0bbdc6ef7f6bb0 (patch) | |
tree | 831e2107c7a6f981f77a6609d812f7178a17066c /src/armnn/DllExport.hpp | |
parent | d466a54e79560f0ccacc6b13cd64e08defbac47c (diff) | |
download | armnn-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.hpp | 19 |
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 |