Resync (forgot to add new files?)
[CMakeLuaTailorHgBridge.git] / CMakeLua / Modules / CMakeCXXCompilerId.cpp.in
blob060c7e9c1651942fada4df6164c219cd4871e0cb
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
3 example. */
4 #ifndef __cplusplus
5 # error "A C compiler has been selected for C++."
6 #endif
8 /* Provide main() so the program can link. */
9 int main() { return 0; }
11 #if defined(__COMO__)
12 # define COMPILER_ID "Comeau"
14 #elif defined(__INTEL_COMPILER) || defined(__ICC)
15 # define COMPILER_ID "Intel"
17 #elif defined(__BORLANDC__)
18 # define COMPILER_ID "Borland"
20 #elif defined(__WATCOMC__)
21 # define COMPILER_ID "Watcom"
23 #elif defined(__SUNPRO_CC)
24 # define COMPILER_ID "SunPro"
26 #elif defined(__HP_aCC)
27 # define COMPILER_ID "HP"
29 #elif defined(__DECCXX)
30 # define COMPILER_ID "Compaq"
32 #elif defined(__IBMCPP__)
33 # define COMPILER_ID "VisualAge"
35 #elif defined(__PGI)
36 # define COMPILER_ID "PGI"
38 #elif defined(__GNUC__)
39 # define COMPILER_ID "GNU"
41 #elif defined(_MSC_VER)
42 # define COMPILER_ID "MSVC"
44 #elif defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
45 /* Analog Devices C++ compiler for Blackfin, TigerSHARC and
46 SHARC (21000) DSPs */
47 # define COMPILER_ID "ADSP"
49 #elif defined(_COMPILER_VERSION)
50 # define COMPILER_ID "MIPSpro"
52 /* This compiler is either not known or is too old to define an
53 identification macro. Try to identify the platform and guess that
54 it is the native compiler. */
55 #elif defined(__sgi)
56 # define COMPILER_ID "MIPSpro"
58 #elif defined(__hpux) || defined(__hpua)
59 # define COMPILER_ID "HP"
61 #else /* unknown compiler */
62 # define COMPILER_ID ""
64 #endif
66 /* Construct the string literal in pieces to prevent the source from
67 getting matched. Store it in a pointer rather than an array
68 because some compilers will just produce instructions to fill the
69 array rather than assigning a pointer to a static array. */
70 char* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
72 @CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT@