ITK  4.13.0
Insight Segmentation and Registration Toolkit
itk_compiler_detection.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 // This is a generated file. Do not edit!
19 
20 #ifndef itk_compiler_detection_h
21 #define itk_compiler_detection_h
22 
23 #define ITK_DEC(X) (X)
24 #define ITK_HEX(X) ( \
25  ((X)>>28 & 0xF) * 10000000 + \
26  ((X)>>24 & 0xF) * 1000000 + \
27  ((X)>>20 & 0xF) * 100000 + \
28  ((X)>>16 & 0xF) * 10000 + \
29  ((X)>>12 & 0xF) * 1000 + \
30  ((X)>>8 & 0xF) * 100 + \
31  ((X)>>4 & 0xF) * 10 + \
32  ((X) & 0xF) \
33  )
34 
35 #ifdef __cplusplus
36 # define ITK_COMPILER_IS_Comeau 0
37 # define ITK_COMPILER_IS_Intel 0
38 # define ITK_COMPILER_IS_PathScale 0
39 # define ITK_COMPILER_IS_Embarcadero 0
40 # define ITK_COMPILER_IS_Borland 0
41 # define ITK_COMPILER_IS_Watcom 0
42 # define ITK_COMPILER_IS_OpenWatcom 0
43 # define ITK_COMPILER_IS_SunPro 0
44 # define ITK_COMPILER_IS_HP 0
45 # define ITK_COMPILER_IS_Compaq 0
46 # define ITK_COMPILER_IS_zOS 0
47 # define ITK_COMPILER_IS_XL 0
48 # define ITK_COMPILER_IS_VisualAge 0
49 # define ITK_COMPILER_IS_PGI 0
50 # define ITK_COMPILER_IS_Cray 0
51 # define ITK_COMPILER_IS_TI 0
52 # define ITK_COMPILER_IS_Fujitsu 0
53 # define ITK_COMPILER_IS_SCO 0
54 # define ITK_COMPILER_IS_AppleClang 0
55 # define ITK_COMPILER_IS_Clang 0
56 # define ITK_COMPILER_IS_GNU 0
57 # define ITK_COMPILER_IS_MSVC 0
58 # define ITK_COMPILER_IS_ADSP 0
59 # define ITK_COMPILER_IS_IAR 0
60 # define ITK_COMPILER_IS_ARMCC 0
61 # define ITK_COMPILER_IS_MIPSpro 0
62 
63 #if defined(__COMO__)
64 # undef ITK_COMPILER_IS_Comeau
65 # define ITK_COMPILER_IS_Comeau 1
66 
67 #elif defined(__INTEL_COMPILER) || defined(__ICC)
68 # undef ITK_COMPILER_IS_Intel
69 # define ITK_COMPILER_IS_Intel 1
70 
71 #elif defined(__PATHCC__)
72 # undef ITK_COMPILER_IS_PathScale
73 # define ITK_COMPILER_IS_PathScale 1
74 
75 #elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
76 # undef ITK_COMPILER_IS_Embarcadero
77 # define ITK_COMPILER_IS_Embarcadero 1
78 
79 #elif defined(__BORLANDC__)
80 # undef ITK_COMPILER_IS_Borland
81 # define ITK_COMPILER_IS_Borland 1
82 
83 #elif defined(__WATCOMC__) && __WATCOMC__ < 1200
84 # undef ITK_COMPILER_IS_Watcom
85 # define ITK_COMPILER_IS_Watcom 1
86 
87 #elif defined(__WATCOMC__)
88 # undef ITK_COMPILER_IS_OpenWatcom
89 # define ITK_COMPILER_IS_OpenWatcom 1
90 
91 #elif defined(__SUNPRO_CC)
92 # undef ITK_COMPILER_IS_SunPro
93 # define ITK_COMPILER_IS_SunPro 1
94 
95 #elif defined(__HP_aCC)
96 # undef ITK_COMPILER_IS_HP
97 # define ITK_COMPILER_IS_HP 1
98 
99 #elif defined(__DECCXX)
100 # undef ITK_COMPILER_IS_Compaq
101 # define ITK_COMPILER_IS_Compaq 1
102 
103 #elif defined(__IBMCPP__) && defined(__COMPILER_VER__)
104 # undef ITK_COMPILER_IS_zOS
105 # define ITK_COMPILER_IS_zOS 1
106 
107 #elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800
108 # undef ITK_COMPILER_IS_XL
109 # define ITK_COMPILER_IS_XL 1
110 
111 #elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800
112 # undef ITK_COMPILER_IS_VisualAge
113 # define ITK_COMPILER_IS_VisualAge 1
114 
115 #elif defined(__PGI)
116 # undef ITK_COMPILER_IS_PGI
117 # define ITK_COMPILER_IS_PGI 1
118 
119 #elif defined(_CRAYC)
120 # undef ITK_COMPILER_IS_Cray
121 # define ITK_COMPILER_IS_Cray 1
122 
123 #elif defined(__TI_COMPILER_VERSION__)
124 # undef ITK_COMPILER_IS_TI
125 # define ITK_COMPILER_IS_TI 1
126 
127 #elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version)
128 # undef ITK_COMPILER_IS_Fujitsu
129 # define ITK_COMPILER_IS_Fujitsu 1
130 
131 #elif defined(__SCO_VERSION__)
132 # undef ITK_COMPILER_IS_SCO
133 # define ITK_COMPILER_IS_SCO 1
134 
135 #elif defined(__clang__) && defined(__apple_build_version__)
136 # undef ITK_COMPILER_IS_AppleClang
137 # define ITK_COMPILER_IS_AppleClang 1
138 
139 #elif defined(__clang__)
140 # undef ITK_COMPILER_IS_Clang
141 # define ITK_COMPILER_IS_Clang 1
142 
143 #elif defined(__GNUC__)
144 # undef ITK_COMPILER_IS_GNU
145 # define ITK_COMPILER_IS_GNU 1
146 
147 #elif defined(_MSC_VER)
148 # undef ITK_COMPILER_IS_MSVC
149 # define ITK_COMPILER_IS_MSVC 1
150 
151 #elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
152 # undef ITK_COMPILER_IS_ADSP
153 # define ITK_COMPILER_IS_ADSP 1
154 
155 #elif defined(__IAR_SYSTEMS_ICC__ ) || defined(__IAR_SYSTEMS_ICC)
156 # undef ITK_COMPILER_IS_IAR
157 # define ITK_COMPILER_IS_IAR 1
158 
159 #elif defined(__ARMCC_VERSION)
160 # undef ITK_COMPILER_IS_ARMCC
161 # define ITK_COMPILER_IS_ARMCC 1
162 
163 #elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION)
164 # undef ITK_COMPILER_IS_MIPSpro
165 # define ITK_COMPILER_IS_MIPSpro 1
166 
167 
168 #endif
169 
170 # if ITK_COMPILER_IS_AppleClang
171 
173 
174 # elif ITK_COMPILER_IS_Clang
175 
177 
178 # elif ITK_COMPILER_IS_GNU && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 404) //Default to UNKWOWN compiler if < 4.4
179 
181 
182 # elif ITK_COMPILER_IS_MSVC && (_MSC_VER >= 1600) //Default to UNKOWN compiler if < 1600
183 
185 
186 # elif ITK_COMPILER_IS_SunPro
187 
189 
190 # elif ITK_COMPILER_IS_Intel
191 
193 
194 # else
195 //NOTE: The follow 4 lines are not autogenerated with WriteCompilerDetectionHeader
196 // Do default behavior of all or nothing# error Unsupported compiler
197 // #warning "compiler not recognized, using all or nothing C++11 support guess"
199 # endif
200 
201 # if ITK_COMPILER_CXX_ALIGNAS
202 # define ITK_ALIGNAS(X) alignas(X)
203 # elif ITK_COMPILER_IS_GNU || ITK_COMPILER_IS_Clang || ITK_COMPILER_IS_AppleClang
204 # define ITK_ALIGNAS(X) __attribute__ ((__aligned__(X)))
205 # elif ITK_COMPILER_IS_MSVC
206 # define ITK_ALIGNAS(X) __declspec(align(X))
207 # else
208 # define ITK_ALIGNAS(X)
209 # endif
210 
211 
212 # if ITK_COMPILER_CXX_ALIGNOF
213 # define ITK_ALIGNOF(X) alignof(X)
214 # elif ITK_COMPILER_IS_GNU || ITK_COMPILER_IS_Clang || ITK_COMPILER_IS_AppleClang
215 # define ITK_ALIGNOF(X) __alignof__(X)
216 # elif ITK_COMPILER_IS_MSVC
217 # define ITK_ALIGNOF(X) __alignof(X)
218 # endif
219 
220 
221 # ifndef ITK_DEPRECATED
222 # if ITK_COMPILER_CXX_ATTRIBUTE_DEPRECATED
223 # define ITK_DEPRECATED [[deprecated]]
224 # define ITK_DEPRECATED_MSG(MSG) [[deprecated(MSG)]]
225 # elif ITK_COMPILER_IS_GNU || ITK_COMPILER_IS_Clang
226 # define ITK_DEPRECATED __attribute__((__deprecated__))
227 # define ITK_DEPRECATED_MSG(MSG) __attribute__((__deprecated__(MSG)))
228 # elif ITK_COMPILER_IS_MSVC
229 # define ITK_DEPRECATED __declspec(deprecated)
230 # define ITK_DEPRECATED_MSG(MSG) __declspec(deprecated(MSG))
231 # else
232 # define ITK_DEPRECATED
233 # define ITK_DEPRECATED_MSG(MSG)
234 # endif
235 # endif
236 
237 
238 # if ITK_COMPILER_CXX_CONSTEXPR
239 # define ITK_CONSTEXPR constexpr
240 # else
241 # define ITK_CONSTEXPR
242 # endif
243 
244 
245 # if ITK_COMPILER_CXX_DELETED_FUNCTIONS
246 # define ITK_DELETED_FUNCTION = delete
247 # else
248 # define ITK_DELETED_FUNCTION
249 # endif
250 
251 
252 # if ITK_COMPILER_CXX_EXTERN_TEMPLATES
253 # define ITK_EXTERN_TEMPLATE extern
254 # else
255 # define ITK_EXTERN_TEMPLATE
256 # endif
257 
258 
259 # if ITK_COMPILER_CXX_FINAL
260 # define ITK_FINAL final
261 # else
262 # define ITK_FINAL
263 # endif
264 
265 
266 # if ITK_COMPILER_CXX_NOEXCEPT
267 # define ITK_NOEXCEPT noexcept
268 # else
269 # define ITK_NOEXCEPT throw()
270 # endif
271 
272 
273 # if ITK_COMPILER_CXX_NULLPTR
274 # define ITK_NULLPTR nullptr
275 # else
276 # define ITK_NULLPTR 0
277 # endif
278 
279 
280 # if ITK_COMPILER_CXX_OVERRIDE
281 # define ITK_OVERRIDE override
282 # else
283 # define ITK_OVERRIDE
284 # endif
285 
286 # if ITK_COMPILER_CXX_STATIC_ASSERT
287 # define ITK_STATIC_ASSERT(X) static_assert(X, #X)
288 # define ITK_STATIC_ASSERT_MSG(X, MSG) static_assert(X, MSG)
289 # else
290 template<bool> struct ITKStaticAssert;
291 template<> struct ITKStaticAssert<true>{};
292 # define ITK_STATIC_ASSERT(X) sizeof(ITKStaticAssert<X>)
293 # define ITK_STATIC_ASSERT_MSG(X, MSG) sizeof(ITKStaticAssert<X>)
294 # endif
295 
296 
297 # if ITK_COMPILER_CXX_THREAD_LOCAL
298 # define ITK_THREAD_LOCAL thread_local
299 # elif ITK_COMPILER_IS_GNU || ITK_COMPILER_IS_Clang || ITK_COMPILER_IS_AppleClang
300 # define ITK_THREAD_LOCAL __thread
301 # elif ITK_COMPILER_IS_MSVC
302 # define ITK_THREAD_LOCAL __declspec(thread)
303 # else
304 // ITK_THREAD_LOCAL not defined for this configuration.
305 # endif
306 
307 #endif
308 
309 #endif // itk_compiler_detection_h