CMake: Support building a single file

Fixes: QTCREATORBUG-18898
Change-Id: I0ec24b20bfa8d43093b6e6681ddd752fbdea2088
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Orgad Shaneh
2019-05-26 23:48:40 +03:00
committed by Orgad Shaneh
parent a7345b67c1
commit b500119fd7
6 changed files with 140 additions and 0 deletions

View File

@@ -862,6 +862,7 @@ void ServerModeReader::addTargets(const QHash<Utils::FilePath, ProjectExplorer::
CMakeTargetNode *tNode = createTargetNode(cmakeListsNodes, t->sourceDirectory, t->name);
QTC_ASSERT(tNode, qDebug() << "No target node for" << t->sourceDirectory << t->name; continue);
tNode->setTargetInformation(t->artifacts, t->type);
tNode->setBuildDirectory(t->buildDirectory);
QList<FolderNode::LocationInfo> info;
// Set up a default target path:
FilePath targetPath = t->sourceDirectory.pathAppended("CMakeLists.txt");