ClangTools: Add settings for build project dependency

All Clang tools get support for running project build
before themselves or skipping that step.
Before this change static analyzer always ran it and
ClangTidy+Clazy tool always skipped.

Change-Id: Idb9fbc27f0589472abb0f9d207857eb79c0079fd
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Ivan Donchevskii
2018-05-02 16:13:01 +02:00
parent c4e3cda26a
commit 97fc02b247
7 changed files with 149 additions and 84 deletions

View File

@@ -49,13 +49,6 @@ struct AnalyzeUnit {
};
typedef QList<AnalyzeUnit> AnalyzeUnits;
class BaseProjectBuilder
{
public:
virtual ~BaseProjectBuilder() {}
virtual bool success() const { return true; }
};
class ClangToolRunControl : public ProjectExplorer::RunWorker
{
Q_OBJECT
@@ -66,11 +59,11 @@ public:
bool success() const { return m_success; } // For testing.
virtual ClangTool *tool() = 0;
protected:
void init();
virtual ClangTool *tool() = 0;
virtual ClangToolRunner *createRunner() = 0;
void onRunnerFinishedWithSuccess(const QString &filePath, const QString &logFilePath);
@@ -91,7 +84,7 @@ private:
void finalize();
protected:
BaseProjectBuilder *m_projectBuilder = nullptr;
ProjectBuilder *m_projectBuilder;
Utils::Environment m_environment;
QString m_clangExecutable;
QString m_clangLogFileDir;