mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 01:15:29 +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:
parent
623685a276
commit
576c9b4495
1 changed files with 5 additions and 11 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue