Skip to content

Commit 32288a5

Browse files
committed
r17 | charles.nicholson | 2010-03-18 15:01:48 -0500 (Thu, 18 Mar 2010) | 1 line
forgot to add file
1 parent 637f00a commit 32288a5

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

src/DllMacros.h

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#ifndef UNITTEST_DLLMACROS_H
2+
#define UNITTEST_DLLMACROS_H
3+
4+
#include "../config.h"
5+
6+
#ifdef UNITTEST_WIN32_DLL
7+
#define UNITTEST_IMPORT __declspec(dllimport)
8+
#define UNITTEST_EXPORT __declspec(dllexport)
9+
10+
#ifdef UNITTEST_DLL_EXPORT
11+
#define UNITTEST_LINKAGE UNITTEST_EXPORT
12+
#define UNITTEST_IMPEXP_TEMPLATE
13+
#else
14+
#define UNITTEST_LINKAGE UNITTEST_IMPORT
15+
#define UNITTEST_IMPEXP_TEMPLATE extern
16+
#endif
17+
18+
#define UNITTEST_STDVECTOR_LINKAGE(T) \
19+
__pragma(warning(push)) \
20+
__pragma(warning(disable:4231)) \
21+
UNITTEST_IMPEXP_TEMPLATE template class UNITTEST_LINKAGE std::allocator < T >; \
22+
UNITTEST_IMPEXP_TEMPLATE template class UNITTEST_LINKAGE std::vector< T >; \
23+
__pragma(warning(pop))
24+
#else
25+
#define UNITTEST_IMPORT
26+
#define UNITTEST_EXPORT
27+
#define UNITTEST_LINKAGE
28+
#define UNITTEST_IMPEXP_TEMPLATE
29+
#define UNITTEST_STDVECTOR_LINKAGE(T)
30+
#endif
31+
32+
#endif

0 commit comments

Comments
 (0)