Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ui/launchbar/ContainerGCCToolChain.java')
-rw-r--r--launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ui/launchbar/ContainerGCCToolChain.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ui/launchbar/ContainerGCCToolChain.java b/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ui/launchbar/ContainerGCCToolChain.java
index 9d6524e43e1..9fce12031fd 100644
--- a/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ui/launchbar/ContainerGCCToolChain.java
+++ b/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ui/launchbar/ContainerGCCToolChain.java
@@ -186,7 +186,14 @@ public class ContainerGCCToolChain extends PlatformObject
try {
Path buildDirectory = Paths.get(buildDirectoryURI);
- Path command = Paths.get(commandStrings.get(0));
+ int offset = 0;
+ Path command = Paths.get(commandStrings.get(offset));
+
+ // look for ccache being used
+ if (command.toString().contains("ccache")) { //$NON-NLS-1$
+ command = Paths.get(commandStrings.get(++offset));
+ }
+
List<String> commandLine = new ArrayList<>();
if (command.isAbsolute()) {
commandLine.add(command.toString());
@@ -213,7 +220,8 @@ public class ContainerGCCToolChain extends PlatformObject
}
addDiscoveryOptions(commandLine);
- commandLine.addAll(commandStrings.subList(1, commandStrings.size()));
+ commandLine.addAll(
+ commandStrings.subList(offset + 1, commandStrings.size()));
// Strip surrounding quotes from the args on Windows
if (Platform.OS_WIN32.equals(Platform.getOS())) {

Back to the top