forked from qt-creator/qt-creator
CompilationDatabase: Add target to the compilation database project
Target exposes information about kit and toolchain to the outside and enables tools like Clang-Tidy and Clazy. Change-Id: I27b73bbb3b810789f6ca3d447b744604f8e61286 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
#include <projectexplorer/kitmanager.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/projectnodes.h>
|
||||
#include <projectexplorer/target.h>
|
||||
#include <projectexplorer/toolchainconfigwidget.h>
|
||||
#include <projectexplorer/toolchainmanager.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
@@ -301,6 +302,8 @@ void CompilationDatabaseProject::buildTreeAndProjectParts(const Utils::FileName
|
||||
|
||||
setRootProjectNode(std::move(root));
|
||||
|
||||
addTarget(createTarget(m_kit.get()));
|
||||
|
||||
m_cppCodeModelUpdater->update({this, cToolchain, cxxToolchain, m_kit.get(), rpps});
|
||||
|
||||
emitParsingFinished(true);
|
||||
|
Reference in New Issue
Block a user