~ubuntu-branches/ubuntu/saucy/kubuntu-debug-installer/saucy

« back to all changes in this revision

Viewing changes to build/CMakeFiles/CompilerIdCXX/CMakeCXXCompilerId.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Thomas
  • Date: 2010-08-13 13:34:37 UTC
  • Revision ID: james.westby@ubuntu.com-20100813133437-zunuz8s4c2hzwiu2
Tags: 10.10ubuntu4
Rebuild for libqapt0 -> libqapt1 transition

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
7
 
 
8
 
#if defined(__COMO__)
9
 
# define COMPILER_ID "Comeau"
10
 
 
11
 
#elif defined(__INTEL_COMPILER) || defined(__ICC)
12
 
# define COMPILER_ID "Intel"
13
 
 
14
 
#elif defined(__BORLANDC__)
15
 
# define COMPILER_ID "Borland"
16
 
 
17
 
#elif defined(__WATCOMC__)
18
 
# define COMPILER_ID "Watcom"
19
 
 
20
 
#elif defined(__SUNPRO_CC)
21
 
# define COMPILER_ID "SunPro"
22
 
 
23
 
#elif defined(__HP_aCC)
24
 
# define COMPILER_ID "HP"
25
 
 
26
 
#elif defined(__DECCXX)
27
 
# define COMPILER_ID "Compaq"
28
 
 
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
37
 
 
38
 
#elif defined(__PGI)
39
 
# define COMPILER_ID "PGI"
40
 
 
41
 
#elif defined(__GNUC__)
42
 
# define COMPILER_ID "GNU"
43
 
 
44
 
#elif defined(_MSC_VER)
45
 
# define COMPILER_ID "MSVC"
46
 
 
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"
51
 
 
52
 
#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION)
53
 
# define COMPILER_ID "MIPSpro"
54
 
 
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"
60
 
 
61
 
#elif defined(__hpux) || defined(__hpua)
62
 
# define COMPILER_ID "HP"
63
 
 
64
 
#else /* unknown compiler */
65
 
# define COMPILER_ID ""
66
 
 
67
 
#endif
68
 
 
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 "]";
74
 
 
75
 
/* Identify known platforms by name.  */
76
 
#if defined(__linux) || defined(__linux__) || defined(linux)
77
 
# define PLATFORM_ID "Linux"
78
 
 
79
 
#elif defined(__CYGWIN__)
80
 
# define PLATFORM_ID "Cygwin"
81
 
 
82
 
#elif defined(__MINGW32__)
83
 
# define PLATFORM_ID "MinGW"
84
 
 
85
 
#elif defined(__APPLE__)
86
 
# define PLATFORM_ID "Darwin"
87
 
 
88
 
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
89
 
# define PLATFORM_ID "Windows"
90
 
 
91
 
#elif defined(__FreeBSD__) || defined(__FreeBSD)
92
 
# define PLATFORM_ID "FreeBSD"
93
 
 
94
 
#elif defined(__NetBSD__) || defined(__NetBSD)
95
 
# define PLATFORM_ID "NetBSD"
96
 
 
97
 
#elif defined(__OpenBSD__) || defined(__OPENBSD)
98
 
# define PLATFORM_ID "OpenBSD"
99
 
 
100
 
#elif defined(__sun) || defined(sun)
101
 
# define PLATFORM_ID "SunOS"
102
 
 
103
 
#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
104
 
# define PLATFORM_ID "AIX"
105
 
 
106
 
#elif defined(__sgi) || defined(__sgi__) || defined(_SGI)
107
 
# define PLATFORM_ID "IRIX"
108
 
 
109
 
#elif defined(__hpux) || defined(__hpux__)
110
 
# define PLATFORM_ID "HP-UX"
111
 
 
112
 
#elif defined(__HAIKU) || defined(__HAIKU__) || defined(_HAIKU)
113
 
# define PLATFORM_ID "Haiku"
114
 
/* Haiku also defines __BEOS__ so we must 
115
 
   put it prior to the check for __BEOS__
116
 
*/
117
 
 
118
 
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
119
 
# define PLATFORM_ID "BeOS"
120
 
 
121
 
#elif defined(__QNX__) || defined(__QNXNTO__)
122
 
# define PLATFORM_ID "QNX"
123
 
 
124
 
#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
125
 
# define PLATFORM_ID "Tru64"
126
 
 
127
 
#elif defined(__riscos) || defined(__riscos__)
128
 
# define PLATFORM_ID "RISCos"
129
 
 
130
 
#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
131
 
# define PLATFORM_ID "SINIX"
132
 
 
133
 
#elif defined(__UNIX_SV__)
134
 
# define PLATFORM_ID "UNIX_SV"
135
 
 
136
 
#elif defined(__bsdos__)
137
 
# define PLATFORM_ID "BSDOS"
138
 
 
139
 
#elif defined(_MPRAS) || defined(MPRAS)
140
 
# define PLATFORM_ID "MP-RAS"
141
 
 
142
 
#elif defined(__osf) || defined(__osf__)
143
 
# define PLATFORM_ID "OSF1"
144
 
 
145
 
#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
146
 
# define PLATFORM_ID "SCO_SV"
147
 
 
148
 
#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
149
 
# define PLATFORM_ID "ULTRIX"
150
 
 
151
 
#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
152
 
# define PLATFORM_ID "Xenix"
153
 
 
154
 
#else /* unknown platform */
155
 
# define PLATFORM_ID ""
156
 
 
157
 
#endif
158
 
 
159
 
/* Construct the string literal in pieces to prevent the source from
160
 
   getting matched.  Store it in a pointer rather than an array
161
 
   because some compilers will just produce instructions to fill the
162
 
   array rather than assigning a pointer to a static array.  */
163
 
char* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
164
 
 
165
 
 
166
 
/*--------------------------------------------------------------------------*/
167
 
 
168
 
int main(int argc, char* argv[])
169
 
{
170
 
  int require = 0;
171
 
  require += info_compiler[argc];
172
 
  require += info_platform[argc];
173
 
  (void)argv;
174
 
  return require;
175
 
}