ENH: typo
[cmake.git] / Modules / CMakeCCompilerId.c
blobec11b6c1b17d4396984d1bc052b9d3ba94aea691
1 #ifdef __cplusplus
2 # error "A C++ compiler has been selected for C."
3 #endif
5 #ifdef __CLASSIC_C__
6 # define const
7 #endif
9 #if defined(__INTEL_COMPILER) || defined(__ICC)
10 # define COMPILER_ID "Intel"
12 #elif defined(__BORLANDC__)
13 # define COMPILER_ID "Borland"
15 #elif defined(__WATCOMC__)
16 # define COMPILER_ID "Watcom"
18 #elif defined(__SUNPRO_C)
19 # define COMPILER_ID "SunPro"
21 #elif defined(__HP_cc)
22 # define COMPILER_ID "HP"
24 #elif defined(__DECC)
25 # define COMPILER_ID "Compaq"
27 #elif defined(__IBMC__)
28 # define COMPILER_ID "VisualAge"
30 #elif defined(__PGI)
31 # define COMPILER_ID "PGI"
33 #elif defined(__GNUC__)
34 # define COMPILER_ID "GNU"
36 #elif defined(_MSC_VER)
37 # define COMPILER_ID "MSVC"
39 #elif defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
40 /* Analog Devices C++ compiler for Blackfin, TigerSHARC and
41 SHARC (21000) DSPs */
42 # define COMPILER_ID "ADSP"
44 /* IAR Systems compiler for embedded systems.
45 http://www.iar.com
46 Not supported yet by CMake
47 #elif defined(__IAR_SYSTEMS_ICC__)
48 # define COMPILER_ID "IAR" */
50 /* sdcc, the small devices C compiler for embedded systems,
51 http://sdcc.sourceforge.net */
52 #elif defined(SDCC)
53 # define COMPILER_ID "SDCC"
55 #elif defined(_COMPILER_VERSION)
56 # define COMPILER_ID "MIPSpro"
58 /* This compiler is either not known or is too old to define an
59 identification macro. Try to identify the platform and guess that
60 it is the native compiler. */
61 #elif defined(__sgi)
62 # define COMPILER_ID "MIPSpro"
64 #elif defined(__hpux) || defined(__hpua)
65 # define COMPILER_ID "HP"
67 #else /* unknown compiler */
68 # define COMPILER_ID ""
70 #endif
72 static char const info_compiler[] = "INFO:compiler[" COMPILER_ID "]";
74 /* Include the platform identification source. */
75 #include "CMakePlatformId.h"
77 /* Make sure the information strings are referenced. */
78 int main()
80 return (&info_compiler[0] != &info_platform[0]);