forked from qt-creator/qt-creator
AutoTools: Handle "-I /some/path" as well as "-I/some/path"
Do the same for -D and -U. Change-Id: I66ea3c03a58e59602e70f6eb39c471cdf063b456 Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This commit is contained in:
committed by
Tobias Hunger
parent
0e7e521a0a
commit
bc7ef69363
@@ -445,7 +445,20 @@ QStringList MakefileParser::parseTermsAfterAssign(const QString &line)
|
||||
int assignPos = line.indexOf(QLatin1Char('=')) + 1;
|
||||
if (assignPos >= line.size())
|
||||
return QStringList();
|
||||
return line.mid(assignPos).split(QLatin1Char(' '), QString::SkipEmptyParts);
|
||||
|
||||
const QStringList parts = line.mid(assignPos).split(QLatin1Char(' '), QString::SkipEmptyParts);
|
||||
QStringList result;
|
||||
for (int i = 0; i < parts.count(); ++i) {
|
||||
const QString cur = parts.at(i);
|
||||
const QString next = (i == parts.count() - 1) ? QString() : parts.at(i + 1);
|
||||
if (cur == QLatin1String("-D") || cur == QLatin1String("-U") || cur == QLatin1String("-I")) {
|
||||
result << cur + next;
|
||||
++i;
|
||||
} else {
|
||||
result << cur;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
bool MakefileParser::maybeParseDefine(const QString &term)
|
||||
|
||||
Reference in New Issue
Block a user