Pothos  0.2.1-g9f04573d
The Pothos dataflow programming software suite
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros
Config.hpp
Go to the documentation of this file.
1 
11 #pragma once
12 // http://gcc.gnu.org/wiki/Visibility
13 // Generic helper definitions for shared library support
14 #if defined _WIN32 || defined __CYGWIN__
15  #define POTHOS_HELPER_DLL_IMPORT __declspec(dllimport)
16  #define POTHOS_HELPER_DLL_EXPORT __declspec(dllexport)
17  #define POTHOS_HELPER_DLL_LOCAL
18 #else
19  #if __GNUC__ >= 4
20  #define POTHOS_HELPER_DLL_IMPORT __attribute__ ((visibility ("default")))
21  #define POTHOS_HELPER_DLL_EXPORT __attribute__ ((visibility ("default")))
22  #define POTHOS_HELPER_DLL_LOCAL __attribute__ ((visibility ("hidden")))
23  #else
24  #define POTHOS_HELPER_DLL_IMPORT
25  #define POTHOS_HELPER_DLL_EXPORT
26  #define POTHOS_HELPER_DLL_LOCAL
27  #endif
28 #endif
29 
30 // Now we use the generic helper definitions above to define POTHOS_API and POTHOS_LOCAL.
31 // POTHOS_API is used for the public API symbols. It either DLL imports or DLL exports (or does nothing for static build)
32 // POTHOS_LOCAL is used for non-api symbols.
33 
34 #define POTHOS_DLL //always building a DLL
35 
36 #ifdef POTHOS_DLL // defined if POTHOS is compiled as a DLL
37  #ifdef POTHOS_DLL_EXPORTS // defined if we are building the POTHOS DLL (instead of using it)
38  #define POTHOS_API POTHOS_HELPER_DLL_EXPORT
39  #define POTHOS_EXTERN
40  #else
41  #define POTHOS_API POTHOS_HELPER_DLL_IMPORT
42  #define POTHOS_EXTERN extern
43  #endif // POTHOS_DLL_EXPORTS
44  #define POTHOS_LOCAL POTHOS_HELPER_DLL_LOCAL
45 #else // POTHOS_DLL is not defined: this means POTHOS is a static lib.
46  #define POTHOS_API
47  #define POTHOS_LOCAL
48  #define POTHOS_EXTERN
49 #endif // POTHOS_DLL
50 
51 #ifdef _MSC_VER
52  #ifndef _USE_MATH_DEFINES
53  #define _USE_MATH_DEFINES //math.h M_* constants
54  #endif //_USE_MATH_DEFINES
55 #endif //_MSC_VER
56 
69 #define POTHOS_FCN_TUPLE(classPath, functionName) \
70  #functionName, &classPath::functionName
71 
72 #include <ciso646>
73 
82 #if defined(_MSC_VER) && _MSC_VER < 1800
83  #define pothos_explicit
84 #else
85  #define pothos_explicit explicit
86 #endif