2007-04-28 17:35:01 +04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
# error "A C++ compiler has been selected for C."
|
|
|
|
#endif
|
|
|
|
|
2008-02-26 02:47:19 +03:00
|
|
|
#if defined(__18CXX)
|
|
|
|
# define ID_VOID_MAIN
|
|
|
|
#endif
|
2016-03-20 12:42:19 +03:00
|
|
|
#if defined(__CLASSIC_C__)
|
|
|
|
/* cv-qualifiers did not exist in K&R C */
|
|
|
|
# define const
|
|
|
|
# define volatile
|
|
|
|
#endif
|
2007-04-28 17:35:01 +04:00
|
|
|
|
2014-05-07 14:25:39 +04:00
|
|
|
@CMAKE_C_COMPILER_ID_CONTENT@
|
2007-05-22 20:48:16 +04:00
|
|
|
|
2008-03-10 16:32:25 +03:00
|
|
|
/* Construct the string literal in pieces to prevent the source from
|
|
|
|
getting matched. Store it in a pointer rather than an array
|
|
|
|
because some compilers will just produce instructions to fill the
|
|
|
|
array rather than assigning a pointer to a static array. */
|
2010-12-29 23:35:15 +03:00
|
|
|
char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
|
2013-10-04 18:10:22 +04:00
|
|
|
#ifdef SIMULATE_ID
|
|
|
|
char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
|
|
|
|
#endif
|
2007-04-28 17:35:01 +04:00
|
|
|
|
2014-01-20 20:57:40 +04:00
|
|
|
#ifdef __QNXNTO__
|
2015-01-14 18:28:59 +03:00
|
|
|
char const* qnxnto = "INFO" ":" "qnxnto[]";
|
2014-01-20 20:57:40 +04:00
|
|
|
#endif
|
|
|
|
|
2015-12-02 18:59:47 +03:00
|
|
|
#if defined(__CRAYXE) || defined(__CRAYXC)
|
|
|
|
char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
|
|
|
|
#endif
|
|
|
|
|
2008-02-25 17:23:14 +03:00
|
|
|
@CMAKE_C_COMPILER_ID_PLATFORM_CONTENT@
|
2013-10-24 21:04:24 +04:00
|
|
|
@CMAKE_C_COMPILER_ID_ERROR_FOR_TEST@
|
2008-08-07 17:09:45 +04:00
|
|
|
|
2016-03-20 12:42:19 +03:00
|
|
|
#if !defined(__STDC__)
|
|
|
|
# define C_DIALECT
|
2015-09-15 20:42:26 +03:00
|
|
|
#elif __STDC_VERSION__ >= 201000L
|
2016-03-20 12:42:19 +03:00
|
|
|
# define C_DIALECT "11"
|
2015-09-15 20:42:26 +03:00
|
|
|
#elif __STDC_VERSION__ >= 199901L
|
2016-03-20 12:42:19 +03:00
|
|
|
# define C_DIALECT "99"
|
2015-09-15 20:42:26 +03:00
|
|
|
#else
|
2016-03-20 12:42:19 +03:00
|
|
|
# define C_DIALECT "90"
|
2015-09-15 20:42:26 +03:00
|
|
|
#endif
|
2016-03-20 12:42:19 +03:00
|
|
|
const char* info_language_dialect_default =
|
|
|
|
"INFO" ":" "dialect_default[" C_DIALECT "]";
|
2015-09-15 20:42:26 +03:00
|
|
|
|
2008-08-07 17:09:45 +04:00
|
|
|
/*--------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
#ifdef ID_VOID_MAIN
|
|
|
|
void main() {}
|
|
|
|
#else
|
2016-03-20 12:42:19 +03:00
|
|
|
# if defined(__CLASSIC_C__)
|
|
|
|
int main(argc, argv) int argc; char *argv[];
|
|
|
|
# else
|
2008-08-07 17:09:45 +04:00
|
|
|
int main(int argc, char* argv[])
|
2016-03-20 12:42:19 +03:00
|
|
|
# endif
|
2008-08-07 17:09:45 +04:00
|
|
|
{
|
|
|
|
int require = 0;
|
|
|
|
require += info_compiler[argc];
|
|
|
|
require += info_platform[argc];
|
2009-11-20 05:58:42 +03:00
|
|
|
require += info_arch[argc];
|
2011-12-05 18:44:09 +04:00
|
|
|
#ifdef COMPILER_VERSION_MAJOR
|
|
|
|
require += info_version[argc];
|
2013-10-04 18:10:22 +04:00
|
|
|
#endif
|
|
|
|
#ifdef SIMULATE_ID
|
|
|
|
require += info_simulate[argc];
|
|
|
|
#endif
|
|
|
|
#ifdef SIMULATE_VERSION_MAJOR
|
|
|
|
require += info_simulate_version[argc];
|
2015-12-02 18:59:47 +03:00
|
|
|
#endif
|
|
|
|
#if defined(__CRAYXE) || defined(__CRAYXC)
|
|
|
|
require += info_cray[argc];
|
2011-12-05 18:44:09 +04:00
|
|
|
#endif
|
2015-11-18 18:12:25 +03:00
|
|
|
require += info_language_dialect_default[argc];
|
2008-08-07 17:09:45 +04:00
|
|
|
(void)argv;
|
|
|
|
return require;
|
|
|
|
}
|
|
|
|
#endif
|