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#if !defined(__has_include)
9/* If the compiler does not have __has_include, pretend the answer is
10   always no.  */
11#  define __has_include(x) 0
12#endif
13
14@CMAKE_CXX_COMPILER_ID_CONTENT@
15
16/* Construct the string literal in pieces to prevent the source from
17   getting matched.  Store it in a pointer rather than an array
18   because some compilers will just produce instructions to fill the
19   array rather than assigning a pointer to a static array.  */
20char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
21#ifdef SIMULATE_ID
22char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
23#endif
24
25#ifdef __QNXNTO__
26char const* qnxnto = "INFO" ":" "qnxnto[]";
27#endif
28
29#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
30char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
31#endif
32
33@CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT@
34@CMAKE_CXX_COMPILER_ID_ERROR_FOR_TEST@
35
36#if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) && _MSVC_LANG < 201403L
37#  if defined(__INTEL_CXX11_MODE__)
38#    if defined(__cpp_aggregate_nsdmi)
39#      define CXX_STD 201402L
40#    else
41#      define CXX_STD 201103L
42#    endif
43#  else
44#    define CXX_STD 199711L
45#  endif
46#elif defined(_MSC_VER) && defined(_MSVC_LANG)
47#  define CXX_STD _MSVC_LANG
48#else
49#  define CXX_STD __cplusplus
50#endif
51
52const char* info_language_standard_default = "INFO" ":" "standard_default["
53#if CXX_STD > 202002L
54  "23"
55#elif CXX_STD > 201703L
56  "20"
57#elif CXX_STD >= 201703L
58  "17"
59#elif CXX_STD >= 201402L
60  "14"
61#elif CXX_STD >= 201103L
62  "11"
63#else
64  "98"
65#endif
66"]";
67
68const char* info_language_extensions_default = "INFO" ":" "extensions_default["
69/* !defined(_MSC_VER) to exclude Clang's MSVC compatibility mode. */
70#if (defined(__clang__) || defined(__GNUC__) ||                               \
71     defined(__TI_COMPILER_VERSION__)) &&                                     \
72  !defined(__STRICT_ANSI__) && !defined(_MSC_VER)
73  "ON"
74#else
75  "OFF"
76#endif
77"]";
78
79/*--------------------------------------------------------------------------*/
80
81int main(int argc, char* argv[])
82{
83  int require = 0;
84  require += info_compiler[argc];
85  require += info_platform[argc];
86#ifdef COMPILER_VERSION_MAJOR
87  require += info_version[argc];
88#endif
89#ifdef COMPILER_VERSION_INTERNAL
90  require += info_version_internal[argc];
91#endif
92#ifdef SIMULATE_ID
93  require += info_simulate[argc];
94#endif
95#ifdef SIMULATE_VERSION_MAJOR
96  require += info_simulate_version[argc];
97#endif
98#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
99  require += info_cray[argc];
100#endif
101  require += info_language_standard_default[argc];
102  require += info_language_extensions_default[argc];
103  (void)argv;
104  return require;
105}
106