Debian Codegraph @

matio-1.5.30/cmake/matio_pubconf.cmake.in

raw
1 /*
2 * Copyright (c) 2015-2026, The matio contributors
3 * Copyright (c) 2010-2014, Christopher C. Hulbert
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 *
9 * 1. Redistributions of source code must retain the above copyright notice, this
10 * list of conditions and the following disclaimer.
11 *
12 * 2. Redistributions in binary form must reproduce the above copyright notice,
13 * this list of conditions and the following disclaimer in the documentation
14 * and/or other materials provided with the distribution.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28 #ifndef MATIO_PUBCONF_H
29 #define MATIO_PUBCONF_H 1
30
31 /* Matio major version number */
32 #define MATIO_MAJOR_VERSION @matio_VERSION_MAJOR@
33
34 /* Matio minor version number */
35 #define MATIO_MINOR_VERSION @matio_VERSION_MINOR@
36
37 /* Matio release level number */
38 #define MATIO_RELEASE_LEVEL @matio_VERSION_PATCH@
39
40 /* Matio version number */
41 #define MATIO_VERSION @matio_VERSION_MAJOR@@matio_VERSION_MINOR@@matio_VERSION_PATCH@
42
43 /* Matio version string */
44 #define MATIO_VERSION_STR "@matio_VERSION@"
45
46 /* Default file format */
47 #cmakedefine MAT_FT_DEFAULT @MAT_FT_DEFAULT@
48
49 /* Define to 1 if you have the <stdint.h> header file. */
50 #cmakedefine01 MATIO_HAVE_STDINT_H
51
52 /* Define to 1 if you have the <inttypes.h> header file. */
53 #cmakedefine01 MATIO_HAVE_INTTYPES_H
54
55 #if !MATIO_HAVE_STDINT_H && defined(_MSC_VER)
56 #include "stdint_msvc.h"
57 #endif
58
59 /* int16 type */
60 #cmakedefine _mat_int16_t @_mat_int16_t@
61
62 /* int32 type */
63 #cmakedefine _mat_int32_t @_mat_int32_t@
64
65 /* int64 type */
66 #cmakedefine _mat_int64_t @_mat_int64_t@
67
68 /* int8 type */
69 #cmakedefine _mat_int8_t @_mat_int8_t@
70
71 /* uint16 type */
72 #cmakedefine _mat_uint16_t @_mat_uint16_t@
73
74 /* uint32 type */
75 #cmakedefine _mat_uint32_t @_mat_uint32_t@
76
77 /* uint64 type */
78 #cmakedefine _mat_uint64_t @_mat_uint64_t@
79
80 /* uint8 type */
81 #cmakedefine _mat_uint8_t @_mat_uint8_t@
82
83 #if MATIO_HAVE_INTTYPES_H
84 # include <inttypes.h>
85 #endif
86
87 #if MATIO_HAVE_STDINT_H
88 # include <stdint.h>
89 #endif
90
91 #ifdef _mat_int64_t
92 typedef _mat_int64_t mat_int64_t;
93 #endif
94 #ifdef _mat_uint64_t
95 typedef _mat_uint64_t mat_uint64_t;
96 #endif
97 #ifdef _mat_int32_t
98 typedef _mat_int32_t mat_int32_t;
99 #endif
100 #ifdef _mat_uint32_t
101 typedef _mat_uint32_t mat_uint32_t;
102 #endif
103 #ifdef _mat_int16_t
104 typedef _mat_int16_t mat_int16_t;
105 #endif
106 #ifdef _mat_uint16_t
107 typedef _mat_uint16_t mat_uint16_t;
108 #endif
109 #ifdef _mat_int8_t
110 typedef _mat_int8_t mat_int8_t;
111 #endif
112 #ifdef _mat_uint8_t
113 typedef _mat_uint8_t mat_uint8_t;
114 #endif
115
116 /*
117 The following macros handle noreturn attributes according to the
118 C11/C++11 standard with fallback to GNU, Clang or MSVC extensions if using
119 an older compiler.
120 */
121 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
122 #define MATIO_NORETURN _Noreturn
123 #define MATIO_NORETURNATTR
124 #elif __cplusplus >= 201103L
125 #if (defined(__GNUC__) && __GNUC__ >= 5) || \
126 (defined(__GNUC__) && defined(__GNUC_MINOR__) && __GNUC__ == 4 && __GNUC_MINOR__ >= 8)
127 #define MATIO_NORETURN [[noreturn]]
128 #define MATIO_NORETURNATTR
129 #elif (defined(__GNUC__) && __GNUC__ >= 3) || \
130 (defined(__GNUC__) && defined(__GNUC_MINOR__) && __GNUC__ == 2 && __GNUC_MINOR__ >= 8)
131 #define MATIO_NORETURN
132 #define MATIO_NORETURNATTR __attribute__((noreturn))
133 #elif defined(__GNUC__)
134 #define MATIO_NORETURN
135 #define MATIO_NORETURNATTR
136 #else
137 #define MATIO_NORETURN [[noreturn]]
138 #define MATIO_NORETURNATTR
139 #endif
140 #elif defined(__clang__)
141 #if __has_attribute(noreturn)
142 #define MATIO_NORETURN
143 #define MATIO_NORETURNATTR __attribute__((noreturn))
144 #else
145 #define MATIO_NORETURN
146 #define MATIO_NORETURNATTR
147 #endif
148 #elif (defined(__GNUC__) && __GNUC__ >= 3) || \
149 (defined(__GNUC__) && defined(__GNUC_MINOR__) && __GNUC__ == 2 && __GNUC_MINOR__ >= 8) || \
150 (defined(__SUNPRO_C) && __SUNPRO_C >= 0x5110)
151 #define MATIO_NORETURN
152 #define MATIO_NORETURNATTR __attribute__((noreturn))
153 #elif (defined(_MSC_VER) && _MSC_VER >= 1200) || \
154 defined(__BORLANDC__)
155 #define MATIO_NORETURN __declspec(noreturn)
156 #define MATIO_NORETURNATTR
157 #else
158 #define MATIO_NORETURN
159 #define MATIO_NORETURNATTR
160 #endif
161
162 /*
163 The following macros handle format attributes for type-checks against a
164 format string.
165 */
166
167 #if defined(__GNUC__) && __GNUC__ >= 3
168 #define MATIO_FORMATATTR_PRINTF1 __attribute__((format(printf, 1, 2)))
169 #define MATIO_FORMATATTR_PRINTF2 __attribute__((format(printf, 2, 3)))
170 #define MATIO_FORMATATTR_VPRINTF __attribute__((format(printf, 1, 0)))
171 #elif defined(__clang__)
172 #if __has_attribute(format)
173 #define MATIO_FORMATATTR_PRINTF1 __attribute__((format(printf, 1, 2)))
174 #define MATIO_FORMATATTR_PRINTF2 __attribute__((format(printf, 2, 3)))
175 #define MATIO_FORMATATTR_VPRINTF __attribute__((format(printf, 1, 0)))
176 #else
177 #define MATIO_FORMATATTR_PRINTF1
178 #define MATIO_FORMATATTR_PRINTF2
179 #define MATIO_FORMATATTR_VPRINTF
180 #endif
181 #else
182 #define MATIO_FORMATATTR_PRINTF1
183 #define MATIO_FORMATATTR_PRINTF2
184 #define MATIO_FORMATATTR_VPRINTF
185 #endif
186
187 /*
188 The following macro handles the deprecated attribute.
189 */
190
191 #if defined(__GNUC__) || defined(__clang__)
192 #define MATIO_DEPRECATED __attribute__((deprecated))
193 #elif defined(_MSC_VER)
194 #define MATIO_DEPRECATED __declspec(deprecated)
195 #else
196 #define MATIO_DEPRECATED
197 #endif
198
199 #endif /* MATIO_PUBCONF_H */