2 Copyright (C) 2012 Modelon AB
\r
4 This program is free software: you can redistribute it and/or modify
\r
5 it under the terms of the BSD style license.
\r
7 This program is distributed in the hope that it will be useful,
\r
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
10 FMILIB_License.txt file for more details.
\r
12 You should have received a copy of the FMILIB_License.txt file
\r
13 along with this program. If not, contact Modelon AB <http://www.modelon.com>.
\r
16 #ifndef CONFIG_FMILIB_H_
\r
17 #define CONFIG_FMILIB_H_
\r
19 /** \file fmilib_config.h
\r
20 \brief Library configuration file generated by the build system.
\r
27 \brief WIN32 is used to identify Windows OS (set on both Win32 and Win64)
\r
35 \brief MINGW is used to identify MSYS/MinGW environment
\r
39 #ifndef CMAKE_INTDIR
\r
40 #define CMAKE_INTDIR "."
\r
41 /** \def CMAKE_INTDIR
\r
42 \brief The macro #CMAKE_INTDIR gives intermediate directory for the current configuration (Debug/Release).
\r
44 It is redefined to "." for Makefile based build environments. Otherwise is set by MSVC. */
\r
47 /** \brief Platform folder separator */
\r
48 #define FMI_FILE_SEP "\\"
\r
50 /** \brief DLL file name suffix(.so, .dll, ...) */
\r
51 #define FMI_DLL_EXT ".dll"
\r
53 /** \brief Folder name inside FMU in which the DLL is found for this platform */
\r
54 #define FMI_PLATFORM "win64"
\r
56 /** \brief Folder name inside FMU where binaries are */
\r
57 #define FMI_BINARIES "binaries"
\r
58 /** \brief Model description XML file name */
\r
59 #define FMI_MODEL_DESCRIPTION_XML "modelDescription.xml"
\r
61 /* #undef FMILIB_STATIC_LIB_ONLY */
\r
62 #ifdef FMILIB_STATIC_LIB_ONLY
\r
64 \def FMILIB_STATIC_LIB_ONLY
\r
65 \brief The macro #FMILIB_STATIC_LIB_ONLY is defined if no fmilib_shared is build. */
\r
68 #ifndef FMILIB_STATIC_LIB_ONLY
\r
70 #ifdef FMILIB_BUILDING_LIBRARY
\r
71 #if 0 /* defined(__GNUC__) MSYS currently does not support visibility attribute */
\r
72 #define FMILIB_EXPORT __attribute__ ((dllexport))
\r
74 /* Note: actually gcc seems to also supports this syntax. */
\r
75 #define FMILIB_EXPORT __declspec(dllexport)
\r
78 #if 0 /* defined(__GNUC__) MSYS currently does not support visibility attribute */
\r
79 #define FMILIB_EXPORT __attribute__ ((dllimport))
\r
81 /* Note: actually gcc seems to also supports this syntax. */
\r
82 #define FMILIB_EXPORT __declspec(dllimport)
\r
85 #define FMILIB_PRIVATE
\r
88 #define FMILIB_EXPORT __attribute__ ((visibility ("default")))
\r
89 #define FMILIB_PRIVATE __attribute__ ((visibility ("hidden")))
\r
91 #define FMILIB_EXPORT
\r
92 #define FMILIB_PRIVATE
\r
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
107 \def FMILIB_PRIVATE
\r
108 \brief Intended for declaration of the private library functions.
\r
111 /* #undef FMILIB_ENABLE_LOG_LEVEL_DEBUG */
\r
112 #ifndef FMILIB_ENABLE_LOG_LEVEL_DEBUG
\r
113 /* Just for doxygen */
\r
114 #define FMILIB_ENABLE_LOG_LEVEL_DEBUG
\r
115 #undef FMILIB_ENABLE_LOG_LEVEL_DEBUG
\r
118 \def FMILIB_ENABLE_LOG_LEVEL_DEBUG
\r
119 \brief Activates debug level log messages. If not defined the debug messages are compiled out.
\r
122 #if defined _MSC_VER
\r
123 #define FMILIB_SIZET_FORMAT "%Iu"
\r
125 #define FMILIB_SIZET_FORMAT "%zu"
\r
128 /* #undef FMILIB_GENERATE_BUILD_STAMP */
\r
129 #ifndef FMILIB_GENERATE_BUILD_STAMP
\r
130 /* Just for Doxygen */
\r
131 #define FMILIB_GENERATE_BUILD_STAMP
\r
132 #undef FMILIB_GENERATE_BUILD_STAMP
\r
135 \def FMILIB_GENERATE_BUILD_STAMP
\r
136 \brief Generate build-stamp file and enable fmilib_get_build_stamp().
\r
139 #ifdef FMILIB_GENERATE_BUILD_STAMP
\r
144 /** \brief Get the library build stamp.
\r
145 \return A string giving SVN revision and build time for the library.
\r
147 The function is only active if the library was configured with #FMILIB_GENERATE_BUILD_STAMP ON
\r
149 FMILIB_EXPORT const char* fmilib_get_build_stamp(void);
\r
155 #define HAVE_VA_COPY
\r
156 /* #undef HAVE___VA_COPY */
\r
158 #define HAVE_VSNPRINTF
\r
159 #ifdef HAVE_VSNPRINTF
\r
160 #define jm_rpl_vsnprintf vsnprintf
\r