File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments