mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-10 12:03:16 +02:00
Fix for build output dir calculation for managed projects
This commit is contained in:
parent
32a9f67aea
commit
68d9181153
3 changed files with 16 additions and 7 deletions
|
@ -2620,25 +2620,30 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider
|
|||
|
||||
public ICOutputEntry[] getOutputEntries(){
|
||||
if(isManagedBuildOn()){
|
||||
return getDefaultOutputSettings(true);
|
||||
return getDefaultOutputSettings();
|
||||
}
|
||||
ICOutputEntry[] entries = getOutputEntrySettings();
|
||||
if(entries == null || entries.length == 0){
|
||||
entries = getDefaultOutputSettings(false);
|
||||
entries = getDefaultOutputSettings();
|
||||
}
|
||||
return entries;
|
||||
}
|
||||
|
||||
private ICOutputEntry[] getDefaultOutputSettings(boolean managedBuildOn){
|
||||
private ICOutputEntry[] getDefaultOutputSettings(){
|
||||
Configuration cfg = (Configuration)getConfguration();
|
||||
if(cfg == null || cfg.isPreference() || cfg.isExtensionElement()){
|
||||
return new ICOutputEntry[]{new COutputEntry(Path.EMPTY, null, ICLanguageSettingEntry.VALUE_WORKSPACE_PATH | ICLanguageSettingEntry.RESOLVED)};
|
||||
}
|
||||
|
||||
IPath path = cfg.getOwner().getProject().getFullPath();;
|
||||
if(managedBuildOn){
|
||||
path = path.append(cfg.getName());
|
||||
IPath path = ManagedBuildManager.getBuildFullPath(cfg, this);
|
||||
IProject proj = cfg.getOwner().getProject();
|
||||
IPath projFullPath = proj.getFullPath();
|
||||
if(projFullPath.isPrefixOf(path)){
|
||||
path = path.removeFirstSegments(projFullPath.segmentCount()).makeRelative();
|
||||
} else {
|
||||
path = Path.EMPTY;
|
||||
}
|
||||
|
||||
return new ICOutputEntry[]{new COutputEntry(path, null, ICLanguageSettingEntry.VALUE_WORKSPACE_PATH | ICLanguageSettingEntry.RESOLVED)};
|
||||
}
|
||||
|
||||
|
|
|
@ -32,12 +32,15 @@ public class CBuildSettingCache extends CDefaultBuildData implements
|
|||
private ICOutputEntry[] fResolvedOutputEntries;
|
||||
|
||||
CBuildSettingCache(CBuildData base, CConfigurationDescriptionCache cfgCache){
|
||||
super(base.getId(), base);
|
||||
super(/*base.getId(), base*/);
|
||||
|
||||
fId = base.getId();
|
||||
|
||||
fCfgCache = cfgCache;
|
||||
|
||||
fCfgCache.addBuildSetting(this);
|
||||
|
||||
copySettingsFrom(base);
|
||||
}
|
||||
|
||||
void initEnvironmentCache(){
|
||||
|
|
|
@ -204,6 +204,7 @@ public class CConfigurationDescriptionCache extends CDefaultConfigurationData
|
|||
|
||||
void addBuildSetting(ICBuildSetting bs){
|
||||
fChildList.add(bs);
|
||||
fBuildData = (CBuildData)bs;
|
||||
}
|
||||
|
||||
public ICProjectDescription getProjectDescription() {
|
||||
|
|
Loading…
Add table
Reference in a new issue