@@ -39,56 +39,7 @@ public class CompileDescription {
39
39
private static final String ENV_KEY_JANTJE_LINK_COMPILE_OPTIONS = Const .ENV_KEY_JANTJE_START + "extra.link" ; //$NON-NLS-1$
40
40
private static final String ENV_KEY_JANTJE_ALL_COMPILE_OPTIONS = Const .ENV_KEY_JANTJE_START + "extra.all" ; //$NON-NLS-1$
41
41
42
- // /**
43
- // * gets the compile options stored in this configuration description. if the
44
- // * configuration description is null the default compile options are returned.
45
- // *
46
- // * @param confDesc null for default or the configuration description you want
47
- // * the compile options for
48
- // */
49
- // public CompileDescription(ICConfigurationDescription confDesc) {
50
- // if (confDesc != null) {
51
- //
52
- // IEnvironmentVariableManager envManager =
53
- // CCorePlugin.getDefault().getBuildEnvironmentManager();
54
- // IContributedEnvironment contribEnv = envManager.getContributedEnvironment();
55
- // IEnvironmentVariable var =
56
- // contribEnv.getVariable(ENV_KEY_JANTJE_WARNING_LEVEL, confDesc);
57
- // if (var != null)
58
- // this.myWarningLevel = Boolean.valueOf(var.getValue());
59
- // var = contribEnv.getVariable(ENV_KEY_JANTJE_SIZE_SWITCH, confDesc);
60
- // if (var != null)
61
- // this.myAlternativeSizeCommand =
62
- // var.getValue().contains(ENV_KEY_JANTJE_SIZE_COMMAND);
63
- // var = contribEnv.getVariable(ENV_KEY_JANTJE_ADDITIONAL_COMPILE_OPTIONS,
64
- // confDesc);
65
- // if (var != null)
66
- // this.my_C_andCPP_CompileOptions = var.getValue();
67
- // var = contribEnv.getVariable(ENV_KEY_JANTJE_ADDITIONAL_C_COMPILE_OPTIONS,
68
- // confDesc);
69
- // if (var != null)
70
- // this.my_C_CompileOptions = var.getValue();
71
- // var = contribEnv.getVariable(ENV_KEY_JANTJE_ADDITIONAL_CPP_COMPILE_OPTIONS,
72
- // confDesc);
73
- // if (var != null)
74
- // this.my_CPP_CompileOptions = var.getValue();
75
- // var = contribEnv.getVariable(ENV_KEY_JANTJE_ASSEMBLY_COMPILE_OPTIONS,
76
- // confDesc);
77
- // if (var != null)
78
- // this.my_Assembly_CompileOptions = var.getValue();
79
- // var = contribEnv.getVariable(ENV_KEY_JANTJE_ARCHIVE_COMPILE_OPTIONS,
80
- // confDesc);
81
- // if (var != null)
82
- // this.my_Archive_CompileOptions = var.getValue();
83
- // var = contribEnv.getVariable(ENV_KEY_JANTJE_LINK_COMPILE_OPTIONS, confDesc);
84
- // if (var != null)
85
- // this.my_Link_CompileOptions = var.getValue();
86
- // var = contribEnv.getVariable(ENV_KEY_JANTJE_ALL_COMPILE_OPTIONS, confDesc);
87
- // if (var != null)
88
- // this.my_All_CompileOptions = var.getValue();
89
- //
90
- // }
91
- // }
42
+
92
43
93
44
public boolean isWarningLevel () {
94
45
return this .myWarningLevel ;
@@ -202,7 +153,10 @@ public Map<String, String> getEnvVars() {
202
153
public boolean needsRebuild (CompileDescription curOptions ) {
203
154
// ignore myWarningLevel
204
155
// ignore myAlternativeSizeCommand
205
- return equalCompileOptions (curOptions );
156
+ if (curOptions == null ) {
157
+ return true ;
158
+ }
159
+ return !equalCompileOptions (curOptions );
206
160
}
207
161
208
162
/**
@@ -252,6 +206,19 @@ public CompileDescription() {
252
206
// therefore this is not set here but in the ui before project creation
253
207
}
254
208
209
+ public CompileDescription (CompileDescription compileDescription ) {
210
+ myWarningLevel = compileDescription .myWarningLevel ;
211
+ myAlternativeSizeCommand = compileDescription .myAlternativeSizeCommand ;
212
+ myEnableParallelBuild = compileDescription .myEnableParallelBuild ;
213
+ my_CPP_CompileOptions = compileDescription .my_CPP_CompileOptions ;
214
+ my_C_CompileOptions = compileDescription .my_C_CompileOptions ;
215
+ my_C_andCPP_CompileOptions = compileDescription .my_C_andCPP_CompileOptions ;
216
+ my_Assembly_CompileOptions = compileDescription .my_Assembly_CompileOptions ;
217
+ my_Archive_CompileOptions = compileDescription .my_Archive_CompileOptions ;
218
+ my_Link_CompileOptions = compileDescription .my_Link_CompileOptions ;
219
+ my_All_CompileOptions = compileDescription .my_All_CompileOptions ;
220
+ }
221
+
255
222
/**
256
223
* Compares 2 compile descriptors
257
224
*
0 commit comments