DAP: Add check that cmake 3.27 or higher

If CMake version is lower then 3.27
- Shows the warning in general message
- Starts CMake without debugging
- Stops debugging correctly

Change-Id: Ibb13555c20ae2961c0a3c2ef6ec0fcc25930dddc
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Artem Sokolovskii
2023-08-03 14:39:33 +02:00
parent 83d2ee56b7
commit 3ab2da691d
4 changed files with 21 additions and 4 deletions

View File

@@ -3,6 +3,8 @@
#include "cmakedapengine.h"
#include <coreplugin/messagemanager.h>
#include <debugger/debuggermainwindow.h>
#include <utils/temporarydirectory.h>
@@ -14,6 +16,7 @@
#include <QDebug>
#include <QLocalSocket>
#include <QLoggingCategory>
#include <QTimer>
using namespace Core;
using namespace Utils;
@@ -112,6 +115,16 @@ void CMakeDapEngine::setupEngine()
[this] { m_dataGenerator->start(); });
ProjectExplorer::ProjectTree::currentBuildSystem()->requestDebugging();
QTimer::singleShot(5000, this, [this] {
if (!m_dataGenerator->isRunning()) {
m_dataGenerator->kill();
MessageManager::writeDisrupting(
"CMake server is not running. Please check that your CMake is 3.27 or higher.");
return;
}
});
notifyEngineSetupOk();
}

View File

@@ -41,8 +41,8 @@
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/buildsystem.h>
#include <projectexplorer/projecttree.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/projecttree.h>
#include <QDateTime>
#include <QDebug>