FMI Library: part of JModelica.org
fmilib_config.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2012 Modelon AB
3 
4  This program is free software: you can redistribute it and/or modify
5  it under the terms of the BSD style license.
6 
7  This program is distributed in the hope that it will be useful,
8  but WITHOUT ANY WARRANTY; without even the implied warranty of
9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  FMILIB_License.txt file for more details.
11 
12  You should have received a copy of the FMILIB_License.txt file
13  along with this program. If not, contact Modelon AB <http://www.modelon.com>.
14 */
15 
16 #ifndef CONFIG_FMILIB_H_
17 #define CONFIG_FMILIB_H_
18 
23 #ifndef WIN32
24 /* #undef WIN32 */
25 #ifdef WIN32
26 
29 #endif
30 #endif
31 
32 /* #undef MINGW */
33 #ifdef MINGW
34 
37 #endif
38 
39 #ifndef CMAKE_INTDIR
40 #define CMAKE_INTDIR "."
41 
45 #endif
46 
48 #define FMI_FILE_SEP "/"
49 
51 #define FMI_DLL_EXT ".so"
52 
54 #define FMI_PLATFORM "linux64"
55 
57 #define FMI_BINARIES "binaries"
58 
59 #define FMI_MODEL_DESCRIPTION_XML "modelDescription.xml"
60 
61 /* #undef FMILIB_STATIC_LIB_ONLY */
62 #ifdef FMILIB_STATIC_LIB_ONLY
63 
66 #endif
67 
68 #ifndef FMILIB_STATIC_LIB_ONLY
69  #if defined WIN32
70  #ifdef FMILIB_BUILDING_LIBRARY
71  #if 0 /* defined(__GNUC__) MSYS currently does not support visibility attribute */
72  #define FMILIB_EXPORT __attribute__ ((dllexport))
73  #else
74  /* Note: actually gcc seems to also supports this syntax. */
75  #define FMILIB_EXPORT __declspec(dllexport)
76  #endif
77  #else
78  #if 0 /* defined(__GNUC__) MSYS currently does not support visibility attribute */
79  #define FMILIB_EXPORT __attribute__ ((dllimport))
80  #else
81  /* Note: actually gcc seems to also supports this syntax. */
82  #define FMILIB_EXPORT __declspec(dllimport)
83  #endif
84  #endif
85  #define FMILIB_PRIVATE
86  #else
87  #if __GNUC__ >= 4
88  #define FMILIB_EXPORT __attribute__ ((visibility ("default")))
89  #define FMILIB_PRIVATE __attribute__ ((visibility ("hidden")))
90  #else
91  #define FMILIB_EXPORT
92  #define FMILIB_PRIVATE
93  #endif
94  #endif
95 #else
96  #if __GNUC__ >= 4
97  #define FMILIB_EXPORT __attribute__ ((visibility ("default")))
98  #define FMILIB_PRIVATE __attribute__ ((visibility ("hidden")))
99  #else
100  #define FMILIB_EXPORT
101  #define FMILIB_PRIVATE
102  #endif
103 #endif
104 
111 /* #undef FMILIB_ENABLE_LOG_LEVEL_DEBUG */
112 #ifndef FMILIB_ENABLE_LOG_LEVEL_DEBUG
113 /* Just for doxygen */
114 #define FMILIB_ENABLE_LOG_LEVEL_DEBUG
115 #undef FMILIB_ENABLE_LOG_LEVEL_DEBUG
116 #endif
117 
122 #if defined _MSC_VER
123  #define FMILIB_SIZET_FORMAT "%Iu"
124 #else
125  #define FMILIB_SIZET_FORMAT "%zu"
126 #endif
127 
128 /* #undef FMILIB_GENERATE_BUILD_STAMP */
129 #ifndef FMILIB_GENERATE_BUILD_STAMP
130 /* Just for Doxygen */
131 #define FMILIB_GENERATE_BUILD_STAMP
132 #undef FMILIB_GENERATE_BUILD_STAMP
133 #endif
134 
139 #ifdef FMILIB_GENERATE_BUILD_STAMP
140 #ifdef __cplusplus
141 extern "C" {
142 #endif
143 
149 FMILIB_EXPORT const char* fmilib_get_build_stamp(void);
150 #ifdef __cplusplus
151 }
152 #endif
153 #endif
154 
155 /* #undef HAVE_VA_COPY */
156 #define HAVE___VA_COPY
157 
158 #define HAVE_VSNPRINTF
159 #ifdef HAVE_VSNPRINTF
160 #define jm_rpl_vsnprintf vsnprintf
161 #endif
162 
163 #endif
#define FMILIB_EXPORT
Used to declare the public API of the library needed for dynamic linking.