GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: CMakeFiles/3.10.2/CompilerIdCXX/CMakeCXXCompilerId.cpp Lines: 0 7 0.0 %
Date: 2020-06-14 11:23:49 Branches: 0 0 - %

Line Branch Exec Source
1
/* This source file must have a .cpp extension so that all C++ compilers
2
   recognize the extension without flags.  Borland does not know .cxx for
3
   example.  */
4
#ifndef __cplusplus
5
# error "A C compiler has been selected for C++."
6
#endif
7
8
9
/* Version number components: V=Version, R=Revision, P=Patch
10
   Version date components:   YYYY=Year, MM=Month,   DD=Day  */
11
12
#if defined(__COMO__)
13
# define COMPILER_ID "Comeau"
14
  /* __COMO_VERSION__ = VRR */
15
# define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100)
16
# define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100)
17
18
#elif defined(__INTEL_COMPILER) || defined(__ICC)
19
# define COMPILER_ID "Intel"
20
# if defined(_MSC_VER)
21
#  define SIMULATE_ID "MSVC"
22
# endif
23
  /* __INTEL_COMPILER = VRP */
24
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
25
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
26
# if defined(__INTEL_COMPILER_UPDATE)
27
#  define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
28
# else
29
#  define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER   % 10)
30
# endif
31
# if defined(__INTEL_COMPILER_BUILD_DATE)
32
  /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
33
#  define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
34
# endif
35
# if defined(_MSC_VER)
36
   /* _MSC_VER = VVRR */
37
#  define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
38
#  define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
39
# endif
40
41
#elif defined(__PATHCC__)
42
# define COMPILER_ID "PathScale"
43
# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
44
# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
45
# if defined(__PATHCC_PATCHLEVEL__)
46
#  define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
47
# endif
48
49
#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
50
# define COMPILER_ID "Embarcadero"
51
# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
52
# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
53
# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__     & 0xFFFF)
54
55
#elif defined(__BORLANDC__)
56
# define COMPILER_ID "Borland"
57
  /* __BORLANDC__ = 0xVRR */
58
# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
59
# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
60
61
#elif defined(__WATCOMC__) && __WATCOMC__ < 1200
62
# define COMPILER_ID "Watcom"
63
   /* __WATCOMC__ = VVRR */
64
# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
65
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
66
# if (__WATCOMC__ % 10) > 0
67
#  define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
68
# endif
69
70
#elif defined(__WATCOMC__)
71
# define COMPILER_ID "OpenWatcom"
72
   /* __WATCOMC__ = VVRP + 1100 */
73
# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
74
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
75
# if (__WATCOMC__ % 10) > 0
76
#  define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
77
# endif
78
79
#elif defined(__SUNPRO_CC)
80
# define COMPILER_ID "SunPro"
81
# if __SUNPRO_CC >= 0x5100
82
   /* __SUNPRO_CC = 0xVRRP */
83
#  define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12)
84
#  define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF)
85
#  define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC    & 0xF)
86
# else
87
   /* __SUNPRO_CC = 0xVRP */
88
#  define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8)
89
#  define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF)
90
#  define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC    & 0xF)
91
# endif
92
93
#elif defined(__HP_aCC)
94
# define COMPILER_ID "HP"
95
  /* __HP_aCC = VVRRPP */
96
# define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000)
97
# define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100)
98
# define COMPILER_VERSION_PATCH DEC(__HP_aCC     % 100)
99
100
#elif defined(__DECCXX)
101
# define COMPILER_ID "Compaq"
102
  /* __DECCXX_VER = VVRRTPPPP */
103
# define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000)
104
# define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000  % 100)
105
# define COMPILER_VERSION_PATCH DEC(__DECCXX_VER         % 10000)
106
107
#elif defined(__IBMCPP__) && defined(__COMPILER_VER__)
108
# define COMPILER_ID "zOS"
109
  /* __IBMCPP__ = VRP */
110
# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
111
# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
112
# define COMPILER_VERSION_PATCH DEC(__IBMCPP__    % 10)
113
114
#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800
115
# define COMPILER_ID "XL"
116
  /* __IBMCPP__ = VRP */
117
# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
118
# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
119
# define COMPILER_VERSION_PATCH DEC(__IBMCPP__    % 10)
120
121
#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800
122
# define COMPILER_ID "VisualAge"
123
  /* __IBMCPP__ = VRP */
124
# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
125
# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
126
# define COMPILER_VERSION_PATCH DEC(__IBMCPP__    % 10)
127
128
#elif defined(__PGI)
129
# define COMPILER_ID "PGI"
130
# define COMPILER_VERSION_MAJOR DEC(__PGIC__)
131
# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
132
# if defined(__PGIC_PATCHLEVEL__)
133
#  define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
134
# endif
135
136
#elif defined(_CRAYC)
137
# define COMPILER_ID "Cray"
138
# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
139
# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
140
141
#elif defined(__TI_COMPILER_VERSION__)
142
# define COMPILER_ID "TI"
143
  /* __TI_COMPILER_VERSION__ = VVVRRRPPP */
144
# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
145
# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000   % 1000)
146
# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__        % 1000)
147
148
#elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version)
149
# define COMPILER_ID "Fujitsu"
150
151
#elif defined(__SCO_VERSION__)
152
# define COMPILER_ID "SCO"
153
154
#elif defined(__clang__) && defined(__apple_build_version__)
155
# define COMPILER_ID "AppleClang"
156
# if defined(_MSC_VER)
157
#  define SIMULATE_ID "MSVC"
158
# endif
159
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
160
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
161
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
162
# if defined(_MSC_VER)
163
   /* _MSC_VER = VVRR */
164
#  define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
165
#  define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
166
# endif
167
# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
168
169
#elif defined(__clang__)
170
# define COMPILER_ID "Clang"
171
# if defined(_MSC_VER)
172
#  define SIMULATE_ID "MSVC"
173
# endif
174
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
175
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
176
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
177
# if defined(_MSC_VER)
178
   /* _MSC_VER = VVRR */
179
#  define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
180
#  define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
181
# endif
182
183
#elif defined(__GNUC__) || defined(__GNUG__)
184
# define COMPILER_ID "GNU"
185
# if defined(__GNUC__)
186
#  define COMPILER_VERSION_MAJOR DEC(__GNUC__)
187
# else
188
#  define COMPILER_VERSION_MAJOR DEC(__GNUG__)
189
# endif
190
# if defined(__GNUC_MINOR__)
191
#  define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
192
# endif
193
# if defined(__GNUC_PATCHLEVEL__)
194
#  define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
195
# endif
196
197
#elif defined(_MSC_VER)
198
# define COMPILER_ID "MSVC"
199
  /* _MSC_VER = VVRR */
200
# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
201
# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
202
# if defined(_MSC_FULL_VER)
203
#  if _MSC_VER >= 1400
204
    /* _MSC_FULL_VER = VVRRPPPPP */
205
#   define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
206
#  else
207
    /* _MSC_FULL_VER = VVRRPPPP */
208
#   define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
209
#  endif
210
# endif
211
# if defined(_MSC_BUILD)
212
#  define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
213
# endif
214
215
#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
216
# define COMPILER_ID "ADSP"
217
#if defined(__VISUALDSPVERSION__)
218
  /* __VISUALDSPVERSION__ = 0xVVRRPP00 */
219
# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24)
220
# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF)
221
# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8  & 0xFF)
222
#endif
223
224
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
225
# define COMPILER_ID "IAR"
226
# if defined(__VER__)
227
#  define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000)
228
#  define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000)
229
#  define COMPILER_VERSION_PATCH DEC((__VER__) % 1000)
230
#  define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
231
# endif
232
233
#elif defined(__ARMCC_VERSION)
234
# define COMPILER_ID "ARMCC"
235
#if __ARMCC_VERSION >= 1000000
236
  /* __ARMCC_VERSION = VRRPPPP */
237
  # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000)
238
  # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100)
239
  # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION     % 10000)
240
#else
241
  /* __ARMCC_VERSION = VRPPPP */
242
  # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000)
243
  # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10)
244
  # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION    % 10000)
245
#endif
246
247
248
#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION)
249
# define COMPILER_ID "MIPSpro"
250
# if defined(_SGI_COMPILER_VERSION)
251
  /* _SGI_COMPILER_VERSION = VRP */
252
#  define COMPILER_VERSION_MAJOR DEC(_SGI_COMPILER_VERSION/100)
253
#  define COMPILER_VERSION_MINOR DEC(_SGI_COMPILER_VERSION/10 % 10)
254
#  define COMPILER_VERSION_PATCH DEC(_SGI_COMPILER_VERSION    % 10)
255
# else
256
  /* _COMPILER_VERSION = VRP */
257
#  define COMPILER_VERSION_MAJOR DEC(_COMPILER_VERSION/100)
258
#  define COMPILER_VERSION_MINOR DEC(_COMPILER_VERSION/10 % 10)
259
#  define COMPILER_VERSION_PATCH DEC(_COMPILER_VERSION    % 10)
260
# endif
261
262
263
/* These compilers are either not known or too old to define an
264
  identification macro.  Try to identify the platform and guess that
265
  it is the native compiler.  */
266
#elif defined(__sgi)
267
# define COMPILER_ID "MIPSpro"
268
269
#elif defined(__hpux) || defined(__hpua)
270
# define COMPILER_ID "HP"
271
272
#else /* unknown compiler */
273
# define COMPILER_ID ""
274
#endif
275
276
/* Construct the string literal in pieces to prevent the source from
277
   getting matched.  Store it in a pointer rather than an array
278
   because some compilers will just produce instructions to fill the
279
   array rather than assigning a pointer to a static array.  */
280
char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
281
#ifdef SIMULATE_ID
282
char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
283
#endif
284
285
#ifdef __QNXNTO__
286
char const* qnxnto = "INFO" ":" "qnxnto[]";
287
#endif
288
289
#if defined(__CRAYXE) || defined(__CRAYXC)
290
char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
291
#endif
292
293
#define STRINGIFY_HELPER(X) #X
294
#define STRINGIFY(X) STRINGIFY_HELPER(X)
295
296
/* Identify known platforms by name.  */
297
#if defined(__linux) || defined(__linux__) || defined(linux)
298
# define PLATFORM_ID "Linux"
299
300
#elif defined(__CYGWIN__)
301
# define PLATFORM_ID "Cygwin"
302
303
#elif defined(__MINGW32__)
304
# define PLATFORM_ID "MinGW"
305
306
#elif defined(__APPLE__)
307
# define PLATFORM_ID "Darwin"
308
309
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
310
# define PLATFORM_ID "Windows"
311
312
#elif defined(__FreeBSD__) || defined(__FreeBSD)
313
# define PLATFORM_ID "FreeBSD"
314
315
#elif defined(__NetBSD__) || defined(__NetBSD)
316
# define PLATFORM_ID "NetBSD"
317
318
#elif defined(__OpenBSD__) || defined(__OPENBSD)
319
# define PLATFORM_ID "OpenBSD"
320
321
#elif defined(__sun) || defined(sun)
322
# define PLATFORM_ID "SunOS"
323
324
#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
325
# define PLATFORM_ID "AIX"
326
327
#elif defined(__sgi) || defined(__sgi__) || defined(_SGI)
328
# define PLATFORM_ID "IRIX"
329
330
#elif defined(__hpux) || defined(__hpux__)
331
# define PLATFORM_ID "HP-UX"
332
333
#elif defined(__HAIKU__)
334
# define PLATFORM_ID "Haiku"
335
336
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
337
# define PLATFORM_ID "BeOS"
338
339
#elif defined(__QNX__) || defined(__QNXNTO__)
340
# define PLATFORM_ID "QNX"
341
342
#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
343
# define PLATFORM_ID "Tru64"
344
345
#elif defined(__riscos) || defined(__riscos__)
346
# define PLATFORM_ID "RISCos"
347
348
#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
349
# define PLATFORM_ID "SINIX"
350
351
#elif defined(__UNIX_SV__)
352
# define PLATFORM_ID "UNIX_SV"
353
354
#elif defined(__bsdos__)
355
# define PLATFORM_ID "BSDOS"
356
357
#elif defined(_MPRAS) || defined(MPRAS)
358
# define PLATFORM_ID "MP-RAS"
359
360
#elif defined(__osf) || defined(__osf__)
361
# define PLATFORM_ID "OSF1"
362
363
#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
364
# define PLATFORM_ID "SCO_SV"
365
366
#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
367
# define PLATFORM_ID "ULTRIX"
368
369
#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
370
# define PLATFORM_ID "Xenix"
371
372
#elif defined(__WATCOMC__)
373
# if defined(__LINUX__)
374
#  define PLATFORM_ID "Linux"
375
376
# elif defined(__DOS__)
377
#  define PLATFORM_ID "DOS"
378
379
# elif defined(__OS2__)
380
#  define PLATFORM_ID "OS2"
381
382
# elif defined(__WINDOWS__)
383
#  define PLATFORM_ID "Windows3x"
384
385
# else /* unknown platform */
386
#  define PLATFORM_ID
387
# endif
388
389
#else /* unknown platform */
390
# define PLATFORM_ID
391
392
#endif
393
394
/* For windows compilers MSVC and Intel we can determine
395
   the architecture of the compiler being used.  This is because
396
   the compilers do not have flags that can change the architecture,
397
   but rather depend on which compiler is being used
398
*/
399
#if defined(_WIN32) && defined(_MSC_VER)
400
# if defined(_M_IA64)
401
#  define ARCHITECTURE_ID "IA64"
402
403
# elif defined(_M_X64) || defined(_M_AMD64)
404
#  define ARCHITECTURE_ID "x64"
405
406
# elif defined(_M_IX86)
407
#  define ARCHITECTURE_ID "X86"
408
409
# elif defined(_M_ARM64)
410
#  define ARCHITECTURE_ID "ARM64"
411
412
# elif defined(_M_ARM)
413
#  if _M_ARM == 4
414
#   define ARCHITECTURE_ID "ARMV4I"
415
#  elif _M_ARM == 5
416
#   define ARCHITECTURE_ID "ARMV5I"
417
#  else
418
#   define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM)
419
#  endif
420
421
# elif defined(_M_MIPS)
422
#  define ARCHITECTURE_ID "MIPS"
423
424
# elif defined(_M_SH)
425
#  define ARCHITECTURE_ID "SHx"
426
427
# else /* unknown architecture */
428
#  define ARCHITECTURE_ID ""
429
# endif
430
431
#elif defined(__WATCOMC__)
432
# if defined(_M_I86)
433
#  define ARCHITECTURE_ID "I86"
434
435
# elif defined(_M_IX86)
436
#  define ARCHITECTURE_ID "X86"
437
438
# else /* unknown architecture */
439
#  define ARCHITECTURE_ID ""
440
# endif
441
442
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
443
# if defined(__ICCARM__)
444
#  define ARCHITECTURE_ID "ARM"
445
446
# elif defined(__ICCAVR__)
447
#  define ARCHITECTURE_ID "AVR"
448
449
# else /* unknown architecture */
450
#  define ARCHITECTURE_ID ""
451
# endif
452
#else
453
#  define ARCHITECTURE_ID
454
#endif
455
456
/* Convert integer to decimal digit literals.  */
457
#define DEC(n)                   \
458
  ('0' + (((n) / 10000000)%10)), \
459
  ('0' + (((n) / 1000000)%10)),  \
460
  ('0' + (((n) / 100000)%10)),   \
461
  ('0' + (((n) / 10000)%10)),    \
462
  ('0' + (((n) / 1000)%10)),     \
463
  ('0' + (((n) / 100)%10)),      \
464
  ('0' + (((n) / 10)%10)),       \
465
  ('0' +  ((n) % 10))
466
467
/* Convert integer to hex digit literals.  */
468
#define HEX(n)             \
469
  ('0' + ((n)>>28 & 0xF)), \
470
  ('0' + ((n)>>24 & 0xF)), \
471
  ('0' + ((n)>>20 & 0xF)), \
472
  ('0' + ((n)>>16 & 0xF)), \
473
  ('0' + ((n)>>12 & 0xF)), \
474
  ('0' + ((n)>>8  & 0xF)), \
475
  ('0' + ((n)>>4  & 0xF)), \
476
  ('0' + ((n)     & 0xF))
477
478
/* Construct a string literal encoding the version number components. */
479
#ifdef COMPILER_VERSION_MAJOR
480
char const info_version[] = {
481
  'I', 'N', 'F', 'O', ':',
482
  'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
483
  COMPILER_VERSION_MAJOR,
484
# ifdef COMPILER_VERSION_MINOR
485
  '.', COMPILER_VERSION_MINOR,
486
#  ifdef COMPILER_VERSION_PATCH
487
   '.', COMPILER_VERSION_PATCH,
488
#   ifdef COMPILER_VERSION_TWEAK
489
    '.', COMPILER_VERSION_TWEAK,
490
#   endif
491
#  endif
492
# endif
493
  ']','\0'};
494
#endif
495
496
/* Construct a string literal encoding the internal version number. */
497
#ifdef COMPILER_VERSION_INTERNAL
498
char const info_version_internal[] = {
499
  'I', 'N', 'F', 'O', ':',
500
  'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
501
  'i','n','t','e','r','n','a','l','[',
502
  COMPILER_VERSION_INTERNAL,']','\0'};
503
#endif
504
505
/* Construct a string literal encoding the version number components. */
506
#ifdef SIMULATE_VERSION_MAJOR
507
char const info_simulate_version[] = {
508
  'I', 'N', 'F', 'O', ':',
509
  's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
510
  SIMULATE_VERSION_MAJOR,
511
# ifdef SIMULATE_VERSION_MINOR
512
  '.', SIMULATE_VERSION_MINOR,
513
#  ifdef SIMULATE_VERSION_PATCH
514
   '.', SIMULATE_VERSION_PATCH,
515
#   ifdef SIMULATE_VERSION_TWEAK
516
    '.', SIMULATE_VERSION_TWEAK,
517
#   endif
518
#  endif
519
# endif
520
  ']','\0'};
521
#endif
522
523
/* Construct the string literal in pieces to prevent the source from
524
   getting matched.  Store it in a pointer rather than an array
525
   because some compilers will just produce instructions to fill the
526
   array rather than assigning a pointer to a static array.  */
527
char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
528
char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
529
530
531
532
533
#if defined(_MSC_VER) && defined(_MSVC_LANG)
534
#define CXX_STD _MSVC_LANG
535
#else
536
#define CXX_STD __cplusplus
537
#endif
538
539
const char* info_language_dialect_default = "INFO" ":" "dialect_default["
540
#if CXX_STD > 201402L
541
  "17"
542
#elif CXX_STD >= 201402L
543
  "14"
544
#elif CXX_STD >= 201103L
545
  "11"
546
#else
547
  "98"
548
#endif
549
"]";
550
551
/*--------------------------------------------------------------------------*/
552
553
int main(int argc, char* argv[])
554
{
555
  int require = 0;
556
  require += info_compiler[argc];
557
  require += info_platform[argc];
558
#ifdef COMPILER_VERSION_MAJOR
559
  require += info_version[argc];
560
#endif
561
#ifdef COMPILER_VERSION_INTERNAL
562
  require += info_version_internal[argc];
563
#endif
564
#ifdef SIMULATE_ID
565
  require += info_simulate[argc];
566
#endif
567
#ifdef SIMULATE_VERSION_MAJOR
568
  require += info_simulate_version[argc];
569
#endif
570
#if defined(__CRAYXE) || defined(__CRAYXC)
571
  require += info_cray[argc];
572
#endif
573
  require += info_language_dialect_default[argc];
574
  (void)argv;
575
  return require;
576
}