2 Copyright (C) 2012 Modelon AB
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the BSD style license.
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.
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>.
16 #ifndef CONFIG_FMILIB_H_
17 #define CONFIG_FMILIB_H_
19 /** \file fmilib_config.h
20 \brief Library configuration file generated by the build system.
27 \brief WIN32 is used to identify Windows OS (set on both Win32 and Win64)
35 \brief MINGW is used to identify MSYS/MinGW environment
40 #define CMAKE_INTDIR "."
42 \brief The macro #CMAKE_INTDIR gives intermediate directory for the current configuration (Debug/Release).
44 It is redefined to "." for Makefile based build environments. Otherwise is set by MSVC. */
47 /** \brief Platform folder separator */
48 #define FMI_FILE_SEP "@FMI_FILE_SEP@"
\r
50 /** \brief DLL file name suffix(.so, .dll, ...) */
\r
51 #define FMI_DLL_EXT "@CMAKE_SHARED_LIBRARY_SUFFIX@"
\r
53 /** \brief Folder name inside FMU in which the DLL is found for this platform */
54 #define FMI_PLATFORM "@FMI_PLATFORM@"
56 /** \brief Folder name inside FMU where binaries are */
57 #define FMI_BINARIES "binaries"
58 /** \brief Model description XML file name */
59 #define FMI_MODEL_DESCRIPTION_XML "modelDescription.xml"
61 #cmakedefine FMILIB_STATIC_LIB_ONLY
62 #ifdef FMILIB_STATIC_LIB_ONLY
64 \def FMILIB_STATIC_LIB_ONLY
65 \brief The macro #FMILIB_STATIC_LIB_ONLY is defined if no fmilib_shared is build. */
68 #ifndef FMILIB_STATIC_LIB_ONLY
70 #ifdef FMILIB_BUILDING_LIBRARY
71 #if 0 /* defined(__GNUC__) MSYS currently does not support visibility attribute */
72 #define FMILIB_EXPORT __attribute__ ((dllexport))
74 /* Note: actually gcc seems to also supports this syntax. */
75 #define FMILIB_EXPORT __declspec(dllexport)
78 #if 0 /* defined(__GNUC__) MSYS currently does not support visibility attribute */
79 #define FMILIB_EXPORT __attribute__ ((dllimport))
81 /* Note: actually gcc seems to also supports this syntax. */
82 #define FMILIB_EXPORT __declspec(dllimport)
85 #define FMILIB_PRIVATE
88 #define FMILIB_EXPORT __attribute__ ((visibility ("default")))
89 #define FMILIB_PRIVATE __attribute__ ((visibility ("hidden")))
92 #define FMILIB_PRIVATE
97 #define FMILIB_EXPORT __attribute__ ((visibility ("default")))
\r
98 #define FMILIB_PRIVATE __attribute__ ((visibility ("hidden")))
\r
100 #define FMILIB_EXPORT
\r
101 #define FMILIB_PRIVATE
\r
105 /** \def FMILIB_EXPORT
\r
106 \brief Used to declare the public API of the library needed for dynamic linking.
\r
108 \brief Intended for declaration of the private library functions.
111 #cmakedefine 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
118 \def FMILIB_ENABLE_LOG_LEVEL_DEBUG
119 \brief Activates debug level log messages. If not defined the debug messages are compiled out.
123 #define FMILIB_SIZET_FORMAT "%Iu"
125 #define FMILIB_SIZET_FORMAT "%zu"
128 #cmakedefine 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
135 \def FMILIB_GENERATE_BUILD_STAMP
136 \brief Generate build-stamp file and enable fmilib_get_build_stamp().
139 #ifdef FMILIB_GENERATE_BUILD_STAMP
144 /** \brief Get the library build stamp.
145 \return A string giving SVN revision and build time for the library.
147 The function is only active if the library was configured with #FMILIB_GENERATE_BUILD_STAMP ON
149 FMILIB_EXPORT const char* fmilib_get_build_stamp(void);
155 #cmakedefine HAVE_VA_COPY
156 #cmakedefine HAVE___VA_COPY
158 #cmakedefine HAVE_VSNPRINTF
159 #ifdef HAVE_VSNPRINTF
160 #define jm_rpl_vsnprintf vsnprintf