Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/org.eclipse.cdt.cmake.ui/src/org/eclipse/cdt/cmake/ui/properties/CMakePropertyPage.java12
-rw-r--r--build/org.eclipse.cdt.meson.ui/src/org/eclipse/cdt/meson/ui/properties/MesonPropertyPage.java14
2 files changed, 7 insertions, 19 deletions
diff --git a/build/org.eclipse.cdt.cmake.ui/src/org/eclipse/cdt/cmake/ui/properties/CMakePropertyPage.java b/build/org.eclipse.cdt.cmake.ui/src/org/eclipse/cdt/cmake/ui/properties/CMakePropertyPage.java
index 0a8b174de7e..17f33686d68 100644
--- a/build/org.eclipse.cdt.cmake.ui/src/org/eclipse/cdt/cmake/ui/properties/CMakePropertyPage.java
+++ b/build/org.eclipse.cdt.cmake.ui/src/org/eclipse/cdt/cmake/ui/properties/CMakePropertyPage.java
@@ -92,7 +92,7 @@ public class CMakePropertyPage extends PropertyPage {
((ICBuildCommandLauncher)launcher).setBuildConfiguration(cconfig);
}
IPath buildPath = project.getLocation().append("build").append(((CBuildConfiguration)cconfig).getName());
- Process p = launcher.execute(new Path("/bin/sh"), new String[] { "-c", "cmake -LAH ."}, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ Process p = launcher.execute(new Path("cmake"), new String[] { "-LAH", "."}, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
new String[0], buildPath, new NullProgressMonitor());
if (p != null) {
ByteArrayOutputStream stdout = new ByteArrayOutputStream();
@@ -144,7 +144,6 @@ public class CMakePropertyPage extends PropertyPage {
@Override
public boolean performOk() {
List<String> args = new ArrayList<>();
- args.add("cmake"); //$NON-NLS-1$
args.add("-LAH"); //$NON-NLS-1$
for (ICMakePropertyPageControl control : componentList) {
if (control.isValueChanged()) {
@@ -164,13 +163,8 @@ public class CMakePropertyPage extends PropertyPage {
if (launcher instanceof ICBuildCommandLauncher) {
((ICBuildCommandLauncher)launcher).setBuildConfiguration(buildConfig);
}
- StringBuilder b = new StringBuilder();
- for (String arg : args) {
- b.append(arg);
- b.append(" "); //$NON-NLS-1$
- }
- b.append(".");
- Process p = launcher.execute(new Path("/bin/sh"), new String[] { "-c", b.toString() }, new String[0], buildDir, new NullProgressMonitor()); //$NON-NLS-1$ //$NON-NLS-2$
+ args.add(".");
+ Process p = launcher.execute(new Path("cmake"), args.toArray(new String[0]), new String[0], buildDir, new NullProgressMonitor()); //$NON-NLS-1$
int rc = -1;
IConsole console = CCorePlugin.getDefault().getConsole();
console.start(project);
diff --git a/build/org.eclipse.cdt.meson.ui/src/org/eclipse/cdt/meson/ui/properties/MesonPropertyPage.java b/build/org.eclipse.cdt.meson.ui/src/org/eclipse/cdt/meson/ui/properties/MesonPropertyPage.java
index 35cc5d9e310..a7ba446c885 100644
--- a/build/org.eclipse.cdt.meson.ui/src/org/eclipse/cdt/meson/ui/properties/MesonPropertyPage.java
+++ b/build/org.eclipse.cdt.meson.ui/src/org/eclipse/cdt/meson/ui/properties/MesonPropertyPage.java
@@ -90,7 +90,7 @@ public class MesonPropertyPage extends PropertyPage {
if (launcher instanceof ICBuildCommandLauncher) {
((ICBuildCommandLauncher)launcher).setBuildConfiguration(buildConfig);
}
- Process p = launcher.execute(new Path("/bin/sh"), new String[] { "-c", "meson configure " + buildDir}, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ Process p = launcher.execute(new Path("meson"), new String[] { "configure", buildDir}, //$NON-NLS-1$ //$NON-NLS-2$
new String[0], sourceDir, new NullProgressMonitor());
if (p != null) {
ByteArrayOutputStream stdout = new ByteArrayOutputStream();
@@ -114,7 +114,7 @@ public class MesonPropertyPage extends PropertyPage {
if (launcher instanceof ICBuildCommandLauncher) {
((ICBuildCommandLauncher)launcher).setBuildConfiguration(buildConfig);
}
- Process p = launcher.execute(new Path("/bin/sh"), new String[] { "-c", "meson -h"}, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ Process p = launcher.execute(new Path("meson"), new String[] { "-h"}, //$NON-NLS-1$ //$NON-NLS-2$
new String[0], sourceDir, new NullProgressMonitor());
if (p == null) {
return null;
@@ -240,7 +240,6 @@ public class MesonPropertyPage extends PropertyPage {
public boolean performOk() {
List<String> args = new ArrayList<>();
if (configured) {
- args.add("meson"); //$NON-NLS-1$
args.add("configure"); //$NON-NLS-1$
for (IMesonPropertyPageControl control : componentList) {
if (control.isValueChanged()) {
@@ -259,13 +258,8 @@ public class MesonPropertyPage extends PropertyPage {
if (launcher instanceof ICBuildCommandLauncher) {
((ICBuildCommandLauncher)launcher).setBuildConfiguration(buildConfig);
}
- StringBuilder b = new StringBuilder();
- for (String arg : args) {
- b.append(arg);
- b.append(" "); //$NON-NLS-1$
- }
- b.append(buildDir);
- Process p = launcher.execute(new Path("/bin/sh"), new String[] { "-c", b.toString() }, new String[0], sourceDir, new NullProgressMonitor()); //$NON-NLS-1$ //$NON-NLS-2$
+ args.add(buildDir);
+ Process p = launcher.execute(new Path("meson"), args.toArray(new String[0]), new String[0], sourceDir, new NullProgressMonitor()); //$NON-NLS-1$ //$NON-NLS-2$
int rc = -1;
IConsole console = CCorePlugin.getDefault().getConsole();
console.start(project);

Back to the top