1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package com.github.maven_nar.cpptasks;
21
22 import org.apache.tools.ant.types.EnumeratedAttribute;
23
24 import com.github.maven_nar.cpptasks.arm.ADSCCompiler;
25 import com.github.maven_nar.cpptasks.borland.BorlandCCompiler;
26 import com.github.maven_nar.cpptasks.borland.BorlandResourceCompiler;
27 import com.github.maven_nar.cpptasks.compaq.CompaqVisualFortranCompiler;
28 import com.github.maven_nar.cpptasks.compiler.Compiler;
29 import com.github.maven_nar.cpptasks.gcc.GccCCompiler;
30 import com.github.maven_nar.cpptasks.gcc.WindresResourceCompiler;
31 import com.github.maven_nar.cpptasks.hp.aCCCompiler;
32 import com.github.maven_nar.cpptasks.ibm.VisualAgeCCompiler;
33 import com.github.maven_nar.cpptasks.intel.IntelLinux32CCompiler;
34 import com.github.maven_nar.cpptasks.intel.IntelLinux32Compiler;
35 import com.github.maven_nar.cpptasks.intel.IntelLinux64CCompiler;
36 import com.github.maven_nar.cpptasks.intel.IntelLinux64Compiler;
37 import com.github.maven_nar.cpptasks.intel.IntelLinuxFortranCompiler;
38 import com.github.maven_nar.cpptasks.intel.IntelWin32CCompiler;
39 import com.github.maven_nar.cpptasks.intel.IntelWin64CCompiler;
40 import com.github.maven_nar.cpptasks.mozilla.XpidlCompiler;
41 import com.github.maven_nar.cpptasks.msvc.Msvc2005CCompiler;
42 import com.github.maven_nar.cpptasks.msvc.MsvcCCompiler;
43 import com.github.maven_nar.cpptasks.msvc.MsvcMIDLCompiler;
44 import com.github.maven_nar.cpptasks.msvc.MsvcMessageCompiler;
45 import com.github.maven_nar.cpptasks.msvc.MsvcResourceCompiler;
46 import com.github.maven_nar.cpptasks.openwatcom.OpenWatcomCCompiler;
47 import com.github.maven_nar.cpptasks.openwatcom.OpenWatcomFortranCompiler;
48 import com.github.maven_nar.cpptasks.os390.OS390CCompiler;
49 import com.github.maven_nar.cpptasks.os400.IccCompiler;
50 import com.github.maven_nar.cpptasks.sun.C89CCompiler;
51 import com.github.maven_nar.cpptasks.sun.ForteCCCompiler;
52 import com.github.maven_nar.cpptasks.sun.ForteCCompiler;
53 import com.github.maven_nar.cpptasks.sun.ForteF77Compiler;
54 import com.github.maven_nar.cpptasks.ti.ClxxCCompiler;
55 import com.github.maven_nar.cpptasks.trolltech.MetaObjectCompiler;
56 import com.github.maven_nar.cpptasks.trolltech.UserInterfaceCompiler;
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214 public class CompilerEnum extends EnumeratedAttribute {
215 private final static ProcessorEnumValue[] compilers = new ProcessorEnumValue[] {
216 new ProcessorEnumValue("gcc", GccCCompiler.getInstance()),
217 new ProcessorEnumValue("g++", GccCCompiler.getGppInstance()),
218 new ProcessorEnumValue("clang", GccCCompiler.getCLangInstance()),
219 new ProcessorEnumValue("clang++", GccCCompiler.getCLangppInstance()),
220 new ProcessorEnumValue("c++", GccCCompiler.getCppInstance()),
221 new ProcessorEnumValue("g77", GccCCompiler.getG77Instance()),
222
223 new ProcessorEnumValue("gfortran", GccCCompiler.getGFortranInstance()),
224 new ProcessorEnumValue("msvc", MsvcCCompiler.getInstance()),
225 new ProcessorEnumValue("msvc8", Msvc2005CCompiler.getInstance()),
226 new ProcessorEnumValue("bcc", BorlandCCompiler.getInstance()),
227 new ProcessorEnumValue("msrc", MsvcResourceCompiler.getInstance()),
228 new ProcessorEnumValue("msmc", MsvcMessageCompiler.getInstance()),
229 new ProcessorEnumValue("brc", BorlandResourceCompiler.getInstance()),
230 new ProcessorEnumValue("df", CompaqVisualFortranCompiler.getInstance()),
231 new ProcessorEnumValue("midl", MsvcMIDLCompiler.getInstance()),
232 new ProcessorEnumValue("icl", IntelWin32CCompiler.getInstance()),
233 new ProcessorEnumValue("ecl", IntelWin64CCompiler.getInstance()),
234
235 new ProcessorEnumValue("icc", IntelLinux32CCompiler.getInstance()),
236 new ProcessorEnumValue("ecc", IntelLinux64CCompiler.getInstance()),
237 new ProcessorEnumValue("icpc", IntelLinux32Compiler.getInstance()),
238 new ProcessorEnumValue("ecpc", IntelLinux64Compiler.getInstance()),
239 new ProcessorEnumValue("ifort", IntelLinuxFortranCompiler.getInstance()),
240
241 new ProcessorEnumValue("CC", ForteCCCompiler.getInstance()),
242
243 new ProcessorEnumValue("suncc", ForteCCompiler.getInstance()),
244 new ProcessorEnumValue("sunf77", ForteF77Compiler.getInstance()),
245
246 new ProcessorEnumValue("aCC", aCCCompiler.getInstance()),
247 new ProcessorEnumValue("os390", OS390CCompiler.getInstance()),
248 new ProcessorEnumValue("os400", IccCompiler.getInstance()),
249 new ProcessorEnumValue("sunc89", C89CCompiler.getInstance()),
250 new ProcessorEnumValue("xlC", VisualAgeCCompiler.getInstance()),
251 new ProcessorEnumValue("cl6x", ClxxCCompiler.getCl6xInstance()),
252 new ProcessorEnumValue("cl55", ClxxCCompiler.getCl55Instance()),
253 new ProcessorEnumValue("armcc", ADSCCompiler.getArmCC()),
254 new ProcessorEnumValue("armcpp", ADSCCompiler.getArmCpp()),
255 new ProcessorEnumValue("tcc", ADSCCompiler.getThumbCC()),
256 new ProcessorEnumValue("tcpp", ADSCCompiler.getThumbCpp()),
257
258 new ProcessorEnumValue("sparc-sun-solaris2-gcc",
259 com.github.maven_nar.cpptasks.gcc.cross.sparc_sun_solaris2.GccCCompiler.getInstance()),
260 new ProcessorEnumValue("sparc-sun-solaris2-g++",
261 com.github.maven_nar.cpptasks.gcc.cross.sparc_sun_solaris2.GccCCompiler.getGppInstance()),
262 new ProcessorEnumValue("sparc-sun-solaris2-c++",
263 com.github.maven_nar.cpptasks.gcc.cross.sparc_sun_solaris2.GccCCompiler.getCppInstance()),
264 new ProcessorEnumValue("sparc-sun-solaris2-g77",
265 com.github.maven_nar.cpptasks.gcc.cross.sparc_sun_solaris2.GccCCompiler.getG77Instance()),
266
267 new ProcessorEnumValue("gcc-cross", com.github.maven_nar.cpptasks.gcc.cross.GccCCompiler.getInstance()),
268 new ProcessorEnumValue("g++-cross", com.github.maven_nar.cpptasks.gcc.cross.GccCCompiler.getGppInstance()),
269 new ProcessorEnumValue("c++-cross", com.github.maven_nar.cpptasks.gcc.cross.GccCCompiler.getCppInstance()),
270 new ProcessorEnumValue("g77-cross", com.github.maven_nar.cpptasks.gcc.cross.GccCCompiler.getG77Instance()),
271 new ProcessorEnumValue("uic", UserInterfaceCompiler.getInstance()),
272 new ProcessorEnumValue("moc", MetaObjectCompiler.getInstance()),
273 new ProcessorEnumValue("xpidl", XpidlCompiler.getInstance()),
274 new ProcessorEnumValue("wcl", OpenWatcomCCompiler.getInstance()),
275 new ProcessorEnumValue("wfl", OpenWatcomFortranCompiler.getInstance()),
276 new ProcessorEnumValue("windres", WindresResourceCompiler.getInstance())
277 };
278
279 public Compiler getCompiler() {
280 return (Compiler) compilers[getIndex()].getProcessor();
281 }
282
283 @Override
284 public String[] getValues() {
285 return ProcessorEnumValue.getValues(compilers);
286 }
287 }