Skip to content

Commit

Permalink
CMakePM: Allow loading of projects that do not have any targets
Browse files Browse the repository at this point in the history
Fixes: QTCREATORBUG-25509
Change-Id: I4e56576f0d9fdffa50c81f4901fb30d17952553e
Reviewed-by: Alessandro Portale <[email protected]>
  • Loading branch information
cristianadam authored and h4tr3d committed Sep 30, 2021
1 parent 3fb5656 commit c7a3006
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions fileapiparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,13 +337,6 @@ static std::vector<Project> extractProjects(const QJsonArray &projects, QString

static std::vector<Target> extractTargets(const QJsonArray &targets, QString &errorMessage)
{
if (targets.isEmpty()) {
errorMessage
= QCoreApplication::translate("CMakeProjectManager::Internal",
"Invalid codemodel file generated by CMake: No targets.");
return {};
}

std::vector<Target> result;
for (const QJsonValue &v : targets) {
const QJsonObject obj = v.toObject();
Expand Down

0 comments on commit c7a3006

Please sign in to comment.