GUI: Add -isystem and proper standard when running Clang
This commit is contained in:
parent
ef80aba58f
commit
67043b3524
|
@ -116,11 +116,13 @@ void CheckThread::runAddons(const QString &addonPath, const ImportProject::FileS
|
||||||
QString cmd("clang --analyze");
|
QString cmd("clang --analyze");
|
||||||
for (std::list<std::string>::const_iterator I = fileSettings->includePaths.begin(); I != fileSettings->includePaths.end(); ++I)
|
for (std::list<std::string>::const_iterator I = fileSettings->includePaths.begin(); I != fileSettings->includePaths.end(); ++I)
|
||||||
cmd += " -I" + QString::fromStdString(*I);
|
cmd += " -I" + QString::fromStdString(*I);
|
||||||
|
for (std::list<std::string>::const_iterator i = fileSettings->systemIncludePaths.begin(); i != fileSettings->systemIncludePaths.end(); ++i)
|
||||||
|
cmd += " -isystem " + QString::fromStdString(*i);
|
||||||
foreach (QString D, QString::fromStdString(fileSettings->defines).split(";")) {
|
foreach (QString D, QString::fromStdString(fileSettings->defines).split(";")) {
|
||||||
cmd += " -D" + D;
|
cmd += " -D" + D;
|
||||||
}
|
}
|
||||||
if (fileName.endsWith(".cpp"))
|
if (!fileSettings->standard.empty())
|
||||||
cmd += " -std=c++11";
|
cmd += " -std=" + QString::fromStdString(fileSettings->standard);
|
||||||
cmd += ' ' + fileName;
|
cmd += ' ' + fileName;
|
||||||
qDebug() << cmd;
|
qDebug() << cmd;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue