If labels are found on the tests, then print a time summary for all the tests run...
[cmake.git] / Modules / CMakeCXXCompilerId.cpp.in
blob2c8aa3c3c2d5492186aee9194f33bed7635b4a8f
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 #if defined(__COMO__)
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 # if defined(__COMPILER_VER__)
31 # define COMPILER_ID "zOS"
32 # elif __IBMCPP__ >= 800
33 # define COMPILER_ID "XL"
34 # else
35 # define COMPILER_ID "VisualAge"
36 # endif
38 #elif defined(__PGI)
39 # define COMPILER_ID "PGI"
41 #elif defined(__GNUC__)
42 # define COMPILER_ID "GNU"
44 #elif defined(_MSC_VER)
45 # define COMPILER_ID "MSVC"
47 #elif defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
48 /* Analog Devices C++ compiler for Blackfin, TigerSHARC and
49 SHARC (21000) DSPs */
50 # define COMPILER_ID "ADSP"
52 #elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION)
53 # define COMPILER_ID "MIPSpro"
55 /* This compiler is either not known or is too old to define an
56 identification macro. Try to identify the platform and guess that
57 it is the native compiler. */
58 #elif defined(__sgi)
59 # define COMPILER_ID "MIPSpro"
61 #elif defined(__hpux) || defined(__hpua)
62 # define COMPILER_ID "HP"
64 #else /* unknown compiler */
65 # define COMPILER_ID ""
67 #endif
69 /* Construct the string literal in pieces to prevent the source from
70 getting matched. Store it in a pointer rather than an array
71 because some compilers will just produce instructions to fill the
72 array rather than assigning a pointer to a static array. */
73 char* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
75 @CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT@
77 /*--------------------------------------------------------------------------*/
79 int main(int argc, char* argv[])
81 int require = 0;
82 require += info_compiler[argc];
83 require += info_platform[argc];
84 (void)argv;
85 return require;