2007-05-01 02:10:37 +04:00
|
|
|
/* This source file must have a .cpp extension so that all C++ compilers
|
|
|
|
recognize the extension without flags. Borland does not know .cxx for
|
|
|
|
example. */
|
2007-04-28 17:35:01 +04:00
|
|
|
#ifndef __cplusplus
|
|
|
|
# error "A C compiler has been selected for C++."
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__COMO__)
|
2007-05-23 19:00:54 +04:00
|
|
|
# define COMPILER_ID "Comeau"
|
|
|
|
|
2007-04-28 17:35:01 +04:00
|
|
|
#elif defined(__INTEL_COMPILER) || defined(__ICC)
|
2007-05-23 19:00:54 +04:00
|
|
|
# define COMPILER_ID "Intel"
|
|
|
|
|
2007-04-28 17:35:01 +04:00
|
|
|
#elif defined(__BORLANDC__)
|
2007-05-23 19:00:54 +04:00
|
|
|
# define COMPILER_ID "Borland"
|
|
|
|
|
2007-04-28 17:35:01 +04:00
|
|
|
#elif defined(__WATCOMC__)
|
2007-05-23 19:00:54 +04:00
|
|
|
# define COMPILER_ID "Watcom"
|
|
|
|
|
2007-04-28 17:35:01 +04:00
|
|
|
#elif defined(__SUNPRO_CC)
|
2007-05-23 19:00:54 +04:00
|
|
|
# define COMPILER_ID "SunPro"
|
|
|
|
|
2007-04-28 17:35:01 +04:00
|
|
|
#elif defined(__HP_aCC)
|
2007-05-23 19:00:54 +04:00
|
|
|
# define COMPILER_ID "HP"
|
|
|
|
|
2007-04-28 17:35:01 +04:00
|
|
|
#elif defined(__DECCXX)
|
2007-05-23 19:00:54 +04:00
|
|
|
# define COMPILER_ID "Compaq"
|
|
|
|
|
2007-04-28 17:35:01 +04:00
|
|
|
#elif defined(__IBMCPP__)
|
2007-05-23 19:00:54 +04:00
|
|
|
# define COMPILER_ID "VisualAge"
|
|
|
|
|
2007-04-28 17:35:01 +04:00
|
|
|
#elif defined(__GNUC__)
|
2007-05-23 19:00:54 +04:00
|
|
|
# define COMPILER_ID "GNU"
|
|
|
|
|
2007-04-28 17:35:01 +04:00
|
|
|
#elif defined(_MSC_VER)
|
2007-05-23 19:00:54 +04:00
|
|
|
# define COMPILER_ID "MSVC"
|
|
|
|
|
2007-07-12 21:41:00 +04:00
|
|
|
#elif defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
|
|
|
|
/* Analog Devices C++ compiler for Blackfin, TigerSHARC and
|
|
|
|
SHARC (21000) DSPs */
|
|
|
|
# define COMPILER_ID "ADSP"
|
|
|
|
|
2007-04-28 17:35:01 +04:00
|
|
|
#elif defined(_COMPILER_VERSION)
|
2007-05-23 19:00:54 +04:00
|
|
|
# define COMPILER_ID "MIPSpro"
|
2007-04-28 17:35:01 +04:00
|
|
|
|
|
|
|
/* This compiler is either not known or is too old to define an
|
|
|
|
identification macro. Try to identify the platform and guess that
|
|
|
|
it is the native compiler. */
|
|
|
|
#elif defined(__sgi)
|
2007-05-23 19:00:54 +04:00
|
|
|
# define COMPILER_ID "MIPSpro"
|
|
|
|
|
2007-04-28 17:35:01 +04:00
|
|
|
#elif defined(__hpux) || defined(__hpua)
|
2007-05-23 19:00:54 +04:00
|
|
|
# define COMPILER_ID "HP"
|
2007-04-28 17:35:01 +04:00
|
|
|
|
|
|
|
#else /* unknown compiler */
|
2007-05-23 19:00:54 +04:00
|
|
|
# define COMPILER_ID ""
|
|
|
|
|
2007-04-28 17:35:01 +04:00
|
|
|
#endif
|
2007-05-23 19:00:54 +04:00
|
|
|
|
|
|
|
static char const info_compiler[] = "INFO:compiler[" COMPILER_ID "]";
|
2007-04-28 17:35:01 +04:00
|
|
|
|
|
|
|
/* Include the platform identification source. */
|
|
|
|
#include "CMakePlatformId.h"
|
|
|
|
|
|
|
|
/* Make sure the information strings are referenced. */
|
|
|
|
int main()
|
|
|
|
{
|
2007-05-17 18:07:51 +04:00
|
|
|
return (&info_compiler[0] != &info_platform[0]);
|
2007-04-28 17:35:01 +04:00
|
|
|
}
|