mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 02:36:01 +02:00
tidied up a bit
This commit is contained in:
parent
4f4bdf2cbf
commit
1fbb6f4b05
1 changed files with 12 additions and 13 deletions
|
@ -49,14 +49,14 @@ public class CreateIncludeFolder extends CreateSourceFolder {
|
||||||
IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(projectHandle);
|
IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(projectHandle);
|
||||||
try {
|
try {
|
||||||
IConfiguration[] configs = info.getManagedProject().getConfigurations();
|
IConfiguration[] configs = info.getManagedProject().getConfigurations();
|
||||||
for(int i=0; i<configs.length; i++) {
|
for (IConfiguration config : configs) {
|
||||||
String path = projectHandle.getFolder(targetPath).getLocation().toOSString();
|
String path = projectHandle.getFolder(targetPath).getLocation().toOSString();
|
||||||
IToolChain toolChain = configs[i].getToolChain();
|
IToolChain toolChain = config.getToolChain();
|
||||||
setIncludePathOptionForConfig(path, configs[i], toolChain.getOptions(), toolChain);
|
setIncludePathOptionForConfig(path, config, toolChain.getOptions(), toolChain);
|
||||||
|
|
||||||
ITool[] tools = configs[i].getTools();
|
ITool[] tools = config.getTools();
|
||||||
for(int j=0; j<tools.length; j++) {
|
for (ITool tool : tools) {
|
||||||
setIncludePathOptionForConfig(path, configs[i], tools[j].getOptions(), tools[j]);
|
setIncludePathOptionForConfig(path, config, tool.getOptions(), tool);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (BuildException e) {
|
} catch (BuildException e) {
|
||||||
|
@ -66,8 +66,7 @@ public class CreateIncludeFolder extends CreateSourceFolder {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setIncludePathOptionForConfig(String path, IConfiguration config, IOption[] options, IHoldsOptions optionHolder) throws BuildException {
|
private void setIncludePathOptionForConfig(String path, IConfiguration config, IOption[] options, IHoldsOptions optionHolder) throws BuildException {
|
||||||
for (int i = 0; i < options.length; i++) {
|
for (IOption option : options) {
|
||||||
IOption option = options[i];
|
|
||||||
if (option.getValueType() == IOption.INCLUDE_PATH) {
|
if (option.getValueType() == IOption.INCLUDE_PATH) {
|
||||||
String[] includePaths = option.getIncludePaths();
|
String[] includePaths = option.getIncludePaths();
|
||||||
String[] newPaths = new String[includePaths.length + 1];
|
String[] newPaths = new String[includePaths.length + 1];
|
||||||
|
|
Loading…
Add table
Reference in a new issue