Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Johnston2019-05-16 21:58:27 -0400
committerJeff Johnston2019-05-16 21:58:27 -0400
commitb5af112f8658395bca6d208b0c84c5302bceb230 (patch)
tree07b46ab1cc4271c97e8b1d08bb0856d1e7892897 /build/org.eclipse.cdt.make.core
parent74e63a90132d04caa1a7ca5dee70c36b9fb6c968 (diff)
downloadorg.eclipse.cdt-b5af112f8658395bca6d208b0c84c5302bceb230.tar.gz
org.eclipse.cdt-b5af112f8658395bca6d208b0c84c5302bceb230.tar.xz
org.eclipse.cdt-b5af112f8658395bca6d208b0c84c5302bceb230.zip
Bug 547104 - Adding new Docker Connection causes two build dirs
- change createBuildConfiguration() method in providers: MesonBuildConfigurationProvider, CMakeBuildConfigurationProvider, AutotoolsBuildConfigurationProvider,MakefileBuildConfigurationProvider to not create a .x config name and instead use the found IBuildConfiguration so the new CBuildConfiguration will be overridden in the CBuildConfigurationManager Change-Id: Ia5f460e879f3412f19a9dec7b88dd392714b54ca
Diffstat (limited to 'build/org.eclipse.cdt.make.core')
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakefileBuildConfigurationProvider.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakefileBuildConfigurationProvider.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakefileBuildConfigurationProvider.java
index 1b12ceeb1d..64c34e34c2 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakefileBuildConfigurationProvider.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakefileBuildConfigurationProvider.java
@@ -95,12 +95,16 @@ public class MakefileBuildConfigurationProvider implements ICBuildConfigurationP
}
}
String name = configName.toString();
- int i = 0;
- while (configManager.hasConfiguration(this, project, name)) {
- name = configName.toString() + '.' + (++i);
+ IBuildConfiguration config = null;
+ // reuse any IBuildConfiguration with the same name for the project
+ // so adding the CBuildConfiguration will override the old one stored
+ // by the CBuildConfigurationManager
+ if (configManager.hasConfiguration(this, project, name)) {
+ config = project.getBuildConfig(this.getId() + '/' + name);
+ }
+ if (config == null) {
+ config = configManager.createBuildConfiguration(this, project, name, monitor);
}
-
- IBuildConfiguration config = configManager.createBuildConfiguration(this, project, name, monitor);
StandardBuildConfiguration makeConfig = new StandardBuildConfiguration(config, name, toolChain, launchMode);
configManager.addBuildConfiguration(config, makeConfig);
return makeConfig;

Back to the top