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
5 # error "A C compiler has been selected for C++."
8 #if !defined(__has_include)
9 /* If the compiler does not have __has_include, pretend the answer is
11 # define __has_include(x) 0
14 @CMAKE_CXX_COMPILER_ID_CONTENT@
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. */
20 char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
22 char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
26 char const* qnxnto = "INFO" ":" "qnxnto[]";
29 #if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
30 char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
33 @CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT@
34 @CMAKE_CXX_COMPILER_ID_ERROR_FOR_TEST@
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
41 # define CXX_STD 201103L
44 # define CXX_STD 199711L
46 #elif defined(_MSC_VER) && defined(_MSVC_LANG)
47 # define CXX_STD _MSVC_LANG
49 # define CXX_STD __cplusplus
52 const char* info_language_standard_default = "INFO" ":" "standard_default["
55 #elif CXX_STD > 201703L
57 #elif CXX_STD >= 201703L
59 #elif CXX_STD >= 201402L
61 #elif CXX_STD >= 201103L
68 const char* info_language_extensions_default = "INFO" ":" "extensions_default["
69 #if (defined(__clang__) || defined(__GNUC__) || defined(__xlC__) || \
70 defined(__TI_COMPILER_VERSION__)) && \
71 !defined(__STRICT_ANSI__)
78 /*--------------------------------------------------------------------------*/
80 int main(int argc, char* argv[])
83 require += info_compiler[argc];
84 require += info_platform[argc];
85 require += info_arch[argc];
86 #ifdef COMPILER_VERSION_MAJOR
87 require += info_version[argc];
89 #ifdef COMPILER_VERSION_INTERNAL
90 require += info_version_internal[argc];
93 require += info_simulate[argc];
95 #ifdef SIMULATE_VERSION_MAJOR
96 require += info_simulate_version[argc];
98 #if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
99 require += info_cray[argc];
101 require += info_language_standard_default[argc];
102 require += info_language_extensions_default[argc];