diff options
author | Doug Schaefer | 2017-09-28 00:27:40 +0000 |
---|---|---|
committer | Doug Schaefer | 2017-09-28 17:42:58 +0000 |
commit | 5228d193004a8001632385127f5b45a3a5243f7e (patch) | |
tree | 58b418f969732f94b12054aa58bba475e579bbd2 /build/org.eclipse.cdt.cmake.core | |
parent | 80dc8d9c2517e738be2e16a6f98375266259bd0d (diff) | |
download | org.eclipse.cdt-5228d193004a8001632385127f5b45a3a5243f7e.tar.gz org.eclipse.cdt-5228d193004a8001632385127f5b45a3a5243f7e.tar.xz org.eclipse.cdt-5228d193004a8001632385127f5b45a3a5243f7e.zip |
UI for adding toolchains for Core Build. New Generic Target Wizard.
Provide a way to add new toolchains. Also start of UI to allow for
reordering them to help with toolchain selection for targets.
New Generic Target Wizard for the new wizard2 extension point for the
Launch Bar Target UI.
Change-Id: I60635ab27dad5b69df72c339337473183dcf711a
Diffstat (limited to 'build/org.eclipse.cdt.cmake.core')
-rw-r--r-- | build/org.eclipse.cdt.cmake.core/META-INF/MANIFEST.MF | 2 | ||||
-rw-r--r-- | build/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeBuildConfigurationProvider.java | 23 |
2 files changed, 20 insertions, 5 deletions
diff --git a/build/org.eclipse.cdt.cmake.core/META-INF/MANIFEST.MF b/build/org.eclipse.cdt.cmake.core/META-INF/MANIFEST.MF index 76fde2680d3..3a4b5e98c24 100644 --- a/build/org.eclipse.cdt.cmake.core/META-INF/MANIFEST.MF +++ b/build/org.eclipse.cdt.cmake.core/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: CDT CMake Core Bundle-SymbolicName: org.eclipse.cdt.cmake.core;singleton:=true -Bundle-Version: 1.1.0.qualifier +Bundle-Version: 1.2.0.qualifier Bundle-Activator: org.eclipse.cdt.cmake.core.internal.Activator Bundle-Vendor: Eclipse CDT Require-Bundle: org.eclipse.core.runtime, diff --git a/build/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeBuildConfigurationProvider.java b/build/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeBuildConfigurationProvider.java index 4fe7a6d5bef..c09b0850d2e 100644 --- a/build/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeBuildConfigurationProvider.java +++ b/build/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeBuildConfigurationProvider.java @@ -92,7 +92,7 @@ public class CMakeBuildConfigurationProvider implements ICBuildConfigurationProv properties.put(IToolChain.ATTR_OS, os); } String arch = toolChain.getProperty(IToolChain.ATTR_ARCH); - if (!arch.isEmpty()) { + if (arch != null && !arch.isEmpty()) { properties.put(IToolChain.ATTR_ARCH, arch); } ICMakeToolChainFile file = null; @@ -102,9 +102,24 @@ public class CMakeBuildConfigurationProvider implements ICBuildConfigurationProv } // create config - String configName = "cmake." + launchMode + '.' + toolChain.getId(); //$NON-NLS-1$ - IBuildConfiguration config = configManager.createBuildConfiguration(this, project, configName, monitor); - CMakeBuildConfiguration cmakeConfig = new CMakeBuildConfiguration(config, configName, toolChain, file, + StringBuilder configName = new StringBuilder("cmake."); //$NON-NLS-1$ + configName.append(launchMode); + if (os != null) { + configName.append('.'); + configName.append(os); + } + if (arch != null) { + configName.append('.'); + configName.append(arch); + } + String name = configName.toString(); + int i = 0; + while (project.hasBuildConfig(name)) { + name = configName.toString() + '.' + (++i); + } + + IBuildConfiguration config = configManager.createBuildConfiguration(this, project, name, monitor); + CMakeBuildConfiguration cmakeConfig = new CMakeBuildConfiguration(config, name, toolChain, file, launchMode); configManager.addBuildConfiguration(config, cmakeConfig); return cmakeConfig; |