From 576c9b4495cc1e5d46bcfbf9885062eeb33ff686 Mon Sep 17 00:00:00 2001 From: Markus Schorn Date: Mon, 16 Jul 2007 15:15:56 +0000 Subject: [PATCH] Fix for 157870 by James Blackburn, per-file-scanner discovery skips options not related to the include path. --- .../core/scannerconfig/util/CCommandDSC.java | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CCommandDSC.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CCommandDSC.java index cb33f2c11f4..105b5f00001 100644 --- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CCommandDSC.java +++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CCommandDSC.java @@ -128,7 +128,8 @@ public class CCommandDSC { /** * Returns a command where -imacros and -include options have been removed - * @return + * @param quoteIncludePaths whether or not paths for includes must be put inside double quotes. + * @return the command line to run the scanner discovery. */ public String getSCDRunnableCommand(boolean quoteIncludePaths) { String commandAsString = new String(); @@ -147,18 +148,11 @@ public class CCommandDSC { optionPair.getKey().equals(SCDOptionsEnum.ISYSTEM.toString()) || optionPair.getKey().equals(SCDOptionsEnum.IQUOTE.toString())) { value = makeAbsolute(project, value); - } - if (quoteIncludePaths) { - if (optionPair.getKey().equals(SCDOptionsEnum.INCLUDE.toString()) || - optionPair.getKey().equals(SCDOptionsEnum.ISYSTEM.toString()) || - optionPair.getKey().equals(SCDOptionsEnum.IQUOTE.toString())) { - commandAsString += optionPair.getKey() + SINGLE_SPACE + - "\"" + value + "\"" + SINGLE_SPACE; //$NON-NLS-1$//$NON-NLS-2$ + if (quoteIncludePaths) { + value= "\"" + value + "\""; //$NON-NLS-1$ //$NON-NLS-2$ } } - else { - commandAsString += optionPair.getKey() + SINGLE_SPACE + value + SINGLE_SPACE; - } + commandAsString += optionPair.getKey() + SINGLE_SPACE + value + SINGLE_SPACE; } } return commandAsString.trim();