From 67043b35240b59fd42ed755a39323b009a905970 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Thu, 3 Aug 2017 21:39:20 +0200 Subject: [PATCH] GUI: Add -isystem and proper standard when running Clang --- gui/checkthread.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gui/checkthread.cpp b/gui/checkthread.cpp index 42869f55f..ec3119c32 100644 --- a/gui/checkthread.cpp +++ b/gui/checkthread.cpp @@ -116,11 +116,13 @@ void CheckThread::runAddons(const QString &addonPath, const ImportProject::FileS QString cmd("clang --analyze"); for (std::list::const_iterator I = fileSettings->includePaths.begin(); I != fileSettings->includePaths.end(); ++I) cmd += " -I" + QString::fromStdString(*I); + for (std::list::const_iterator i = fileSettings->systemIncludePaths.begin(); i != fileSettings->systemIncludePaths.end(); ++i) + cmd += " -isystem " + QString::fromStdString(*i); foreach (QString D, QString::fromStdString(fileSettings->defines).split(";")) { cmd += " -D" + D; } - if (fileName.endsWith(".cpp")) - cmd += " -std=c++11"; + if (!fileSettings->standard.empty()) + cmd += " -std=" + QString::fromStdString(fileSettings->standard); cmd += ' ' + fileName; qDebug() << cmd;