From 86825283ed7e38ed78ff0e76c755a027b2da461f Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Thu, 16 Sep 2021 18:04:58 +0200 Subject: [PATCH] CMakePM: Allow loading of projects that do not have any targets Fixes: QTCREATORBUG-25509 Change-Id: I4e56576f0d9fdffa50c81f4901fb30d17952553e Reviewed-by: Alessandro Portale --- src/plugins/cmakeprojectmanager/fileapiparser.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/fileapiparser.cpp b/src/plugins/cmakeprojectmanager/fileapiparser.cpp index 0c4ff5ff651..ada6f9a6916 100644 --- a/src/plugins/cmakeprojectmanager/fileapiparser.cpp +++ b/src/plugins/cmakeprojectmanager/fileapiparser.cpp @@ -337,13 +337,6 @@ static std::vector extractProjects(const QJsonArray &projects, QString static std::vector 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 result; for (const QJsonValue &v : targets) { const QJsonObject obj = v.toObject();