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
5 # error "A C compiler has been selected for C++."
9 # define COMPILER_ID "Comeau"
11 #elif defined(__INTEL_COMPILER) || defined(__ICC)
12 # define COMPILER_ID "Intel"
14 #elif defined(__BORLANDC__)
15 # define COMPILER_ID "Borland"
17 #elif defined(__WATCOMC__)
18 # define COMPILER_ID "Watcom"
20 #elif defined(__SUNPRO_CC)
21 # define COMPILER_ID "SunPro"
23 #elif defined(__HP_aCC)
24 # define COMPILER_ID "HP"
26 #elif defined(__DECCXX)
27 # define COMPILER_ID "Compaq"
29 #elif defined(__IBMCPP__)
30 # define COMPILER_ID "VisualAge"
33 # define COMPILER_ID "PGI"
35 #elif defined(__GNUC__)
36 # define COMPILER_ID "GNU"
38 #elif defined(_MSC_VER)
39 # define COMPILER_ID "MSVC"
41 #elif defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
42 /* Analog Devices C++ compiler for Blackfin, TigerSHARC and
44 # define COMPILER_ID "ADSP"
46 #elif defined(_COMPILER_VERSION)
47 # define COMPILER_ID "MIPSpro"
49 /* This compiler is either not known or is too old to define an
50 identification macro. Try to identify the platform and guess that
51 it is the native compiler. */
53 # define COMPILER_ID "MIPSpro"
55 #elif defined(__hpux) || defined(__hpua)
56 # define COMPILER_ID "HP"
58 #else /* unknown compiler */
59 # define COMPILER_ID ""
63 /* Construct the string literal in pieces to prevent the source from
64 getting matched. Store it in a pointer rather than an array
65 because some compilers will just produce instructions to fill the
66 array rather than assigning a pointer to a static array. */
67 char* info_compiler
= "INFO" ":" "compiler[" COMPILER_ID
"]";
69 @CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT@
71 /*--------------------------------------------------------------------------*/
73 int main(int argc
, char* argv
[])
76 require
+= info_compiler
[argc
];
77 require
+= info_platform
[argc
];