m2etis  0.4
SystemParameters.h
Go to the documentation of this file.
1 /*
2  Copyright (2016) Michael Baer, Daniel Bonrath, All rights reserved.
3 
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7 
8  http://www.apache.org/licenses/LICENSE-2.0
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15  */
16 
17 #ifndef __I6ESYSTEMPARAMETERS_H__
18 #define __I6ESYSTEMPARAMETERS_H__
19 
20 #include "m2etis/Config.h"
21 
22 // Global platform specific defines
23 #define I6E_PLATFORM_WIN32 1
24 #define I6E_PLATFORM_LINUX 2
25 #define BOOST_ALL_DYN_LINK
26 #define WIN32_LEAN_AND_MEAN
27 // Determine the current platform
28 #if defined(WIN32 ) || defined(__WIN32__ ) || defined(_WIN32 )
29 # define I6E_PLATFORM I6E_PLATFORM_WIN32
30 # define WIN32_LEAN_AND_MEAN
31 #else
32 # define I6E_PLATFORM I6E_PLATFORM_LINUX
33 #endif
34 
35 // Debug/Release modes
36 #define I6E_DEBUG 1
37 #define I6E_RELEASE 2
38 
39 #if defined(NDEBUG)
40 # define I6E_MODE I6E_RELEASE
41 #else
42 # define I6E_MODE I6E_DEBUG
43 #endif
44 
45 // Dynamic library import/export macro
46 // TODO: Finish off all platforms
47 #ifndef M2ETIS_API
48  #if I6E_PLATFORM == I6E_PLATFORM_WIN32
49  #ifdef M2ETIS_BUILD_SHARED
50  #ifdef m2etis_EXPORTS
51  #define M2ETIS_API __declspec(dllexport)
52  #else
53  #define M2ETIS_API __declspec(dllimport)
54  #endif
55  #else
56  #define M2ETIS_API
57  #endif
58  #elif I6E_PLATFORM == I6E_PLATFORM_LINUX
59  #define M2ETIS_API
60  #else
61  #define M2ETIS_API
62  #endif
63 #endif
64 
65 #ifdef _MSC_VER
66 # pragma warning(disable : 4251) // dll interface to be used by clients...
67 #endif
68 
69 #endif /* __I6ESYSTEMPARAMETERS_H__ */
70 
71 /*
72  * Documentation for all important macros. As doxygen doesn't offer an overview on all defined macros,
73  * a new html page is manually created, that will appear in the documentation. So please document
74  * your global macros here. At best in alphabetic order :)
75  */