cmake/Modules/CMakeCCompilerId.c.in

62 lines
1.4 KiB
C
Raw Normal View History

#ifdef __cplusplus
# error "A C++ compiler has been selected for C."
#endif
#if defined(__18CXX)
# define ID_VOID_MAIN
#endif
2015-04-27 22:25:09 +02:00
@CMAKE_C_COMPILER_ID_CONTENT@
/* 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. */
2011-01-16 11:35:12 +01:00
char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
2014-08-03 19:52:23 +02:00
#ifdef SIMULATE_ID
char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
#endif
#ifdef __QNXNTO__
2015-04-27 22:25:09 +02:00
char const* qnxnto = "INFO" ":" "qnxnto[]";
2014-08-03 19:52:23 +02:00
#endif
@CMAKE_C_COMPILER_ID_PLATFORM_CONTENT@
2014-08-03 19:52:23 +02:00
@CMAKE_C_COMPILER_ID_ERROR_FOR_TEST@
2015-11-17 17:22:37 +01:00
const char* info_language_dialect_default = "INFO" ":" "dialect_default["
#if !defined(__STDC_VERSION__)
"90"
#elif __STDC_VERSION__ >= 201000L
"11"
#elif __STDC_VERSION__ >= 199901L
"99"
#else
#endif
"]";
/*--------------------------------------------------------------------------*/
#ifdef ID_VOID_MAIN
void main() {}
#else
int main(int argc, char* argv[])
{
int require = 0;
require += info_compiler[argc];
require += info_platform[argc];
2010-03-17 14:00:29 +02:00
require += info_arch[argc];
2012-04-19 19:04:21 +03:00
#ifdef COMPILER_VERSION_MAJOR
require += info_version[argc];
2014-08-03 19:52:23 +02:00
#endif
#ifdef SIMULATE_ID
require += info_simulate[argc];
#endif
#ifdef SIMULATE_VERSION_MAJOR
require += info_simulate_version[argc];
2012-04-19 19:04:21 +03:00
#endif
(void)argv;
return require;
}
#endif