1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-12 10:45:37 +02:00

Fix for 157870 by James Blackburn, per-file-scanner discovery skips options not related to the include path.

This commit is contained in:
Markus Schorn 2007-07-16 15:15:56 +00:00
parent 623685a276
commit 576c9b4495

View file

@ -128,7 +128,8 @@ public class CCommandDSC {
/** /**
* Returns a command where -imacros and -include options have been removed * 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) { public String getSCDRunnableCommand(boolean quoteIncludePaths) {
String commandAsString = new String(); String commandAsString = new String();
@ -147,18 +148,11 @@ public class CCommandDSC {
optionPair.getKey().equals(SCDOptionsEnum.ISYSTEM.toString()) || optionPair.getKey().equals(SCDOptionsEnum.ISYSTEM.toString()) ||
optionPair.getKey().equals(SCDOptionsEnum.IQUOTE.toString())) { optionPair.getKey().equals(SCDOptionsEnum.IQUOTE.toString())) {
value = makeAbsolute(project, value); value = makeAbsolute(project, value);
} if (quoteIncludePaths) {
if (quoteIncludePaths) { value= "\"" + value + "\""; //$NON-NLS-1$ //$NON-NLS-2$
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$
} }
} }
else { commandAsString += optionPair.getKey() + SINGLE_SPACE + value + SINGLE_SPACE;
commandAsString += optionPair.getKey() + SINGLE_SPACE + value + SINGLE_SPACE;
}
} }
} }
return commandAsString.trim(); return commandAsString.trim();