Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorDoug Schaefer2017-09-06 19:53:40 +0000
committerDoug Schaefer2017-09-07 19:52:28 +0000
commitc3f3da9f252ae49035fed78b11305c1aad22ccc4 (patch)
tree48cbe41e8f8669724ef8029baa0d1a4da7f34e4a /build
parent47fe12a1793f1ee5ba7f3b20dd7081a5be8466c0 (diff)
downloadorg.eclipse.cdt-c3f3da9f252ae49035fed78b11305c1aad22ccc4.tar.gz
org.eclipse.cdt-c3f3da9f252ae49035fed78b11305c1aad22ccc4.tar.xz
org.eclipse.cdt-c3f3da9f252ae49035fed78b11305c1aad22ccc4.zip
Core Build - add support for Generic target
Adapts to LaunchBar's new Build Tab extension. Change-Id: Icad41a7083f4389a546234d2835a9c4b60fa0eae
Diffstat (limited to 'build')
-rw-r--r--build/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeBuildConfiguration.java4
-rw-r--r--build/org.eclipse.cdt.cmake.ui/src/org/eclipse/cdt/cmake/ui/internal/CMakeBuildTab.java7
2 files changed, 5 insertions, 6 deletions
diff --git a/build/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeBuildConfiguration.java b/build/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeBuildConfiguration.java
index c56396acf50..eb4bea66f1b 100644
--- a/build/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeBuildConfiguration.java
+++ b/build/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeBuildConfiguration.java
@@ -93,7 +93,7 @@ public class CMakeBuildConfiguration extends CBuildConfiguration {
Map<String, String> properties = getProperties();
String generator = properties.get(CMAKE_GENERATOR);
if (generator == null) {
- generator = "Unix Makefiles"; //$NON-NLS-1$
+ generator = "Ninja"; //$NON-NLS-1$
}
project.deleteMarkers(ICModelMarker.C_MODEL_PROBLEM_MARKER, false, IResource.DEPTH_INFINITE);
@@ -200,7 +200,7 @@ public class CMakeBuildConfiguration extends CBuildConfiguration {
String cleanCommand = properties.get(CLEAN_COMMAND);
if (cleanCommand == null) {
- if (generator != null && generator.equals("Ninja")) { //$NON-NLS-1$
+ if (generator == null || generator.equals("Ninja")) { //$NON-NLS-1$
cleanCommand = "ninja clean"; //$NON-NLS-1$
} else {
cleanCommand = "make clean"; //$NON-NLS-1$
diff --git a/build/org.eclipse.cdt.cmake.ui/src/org/eclipse/cdt/cmake/ui/internal/CMakeBuildTab.java b/build/org.eclipse.cdt.cmake.ui/src/org/eclipse/cdt/cmake/ui/internal/CMakeBuildTab.java
index b5abc40765c..7778df8d84b 100644
--- a/build/org.eclipse.cdt.cmake.ui/src/org/eclipse/cdt/cmake/ui/internal/CMakeBuildTab.java
+++ b/build/org.eclipse.cdt.cmake.ui/src/org/eclipse/cdt/cmake/ui/internal/CMakeBuildTab.java
@@ -122,7 +122,7 @@ public class CMakeBuildTab extends AbstractLaunchConfigurationTab {
}
private void updateGeneratorButtons(String generator) {
- if (generator != null && generator.equals("Ninja")) { //$NON-NLS-1$
+ if (generator == null || generator.equals("Ninja")) { //$NON-NLS-1$
ninjaGenButton.setSelection(true);
} else {
unixGenButton.setSelection(true);
@@ -133,9 +133,8 @@ public class CMakeBuildTab extends AbstractLaunchConfigurationTab {
public void performApply(ILaunchConfigurationWorkingCopy configuration) {
Map<String, String> properties = new HashMap<>();
- if (ninjaGenButton.getSelection()) {
- properties.put(CMakeBuildConfiguration.CMAKE_GENERATOR, "Ninja"); //$NON-NLS-1$
- }
+ properties.put(CMakeBuildConfiguration.CMAKE_GENERATOR,
+ ninjaGenButton.getSelection() ? "Ninja" : "Unix Makefiles"); //$NON-NLS-1$ //$NON-NLS-2$
String cmakeArgs = cmakeArgsText.getText().trim();
if (!cmakeArgs.isEmpty()) {

Back to the top