1// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#ifndef CMAKEGENERATOR_H
6#define CMAKEGENERATOR_H
7
8#include "services/language/languagegenerator.h"
9#include "dap/protocol.h"
10
11class CMakeGeneratorPrivate;
12class CMakeGenerator : public dpfservice::LanguageGenerator
13{
14 Q_OBJECT
15public:
16 explicit CMakeGenerator();
17 virtual ~CMakeGenerator() override;
18
19 static QString toolKitName() { return "cmake"; }
20
21 QString debugger() override;
22 bool prepareDebug(const QMap<QString, QVariant> &param, QString &retMsg) override;
23 bool requestDAPPort(const QString &uuid, const QMap<QString, QVariant> &param, QString &retMsg) override;
24 bool isNeedBuild() override;
25 bool isTargetReady() override;
26 bool isLaunchNotAttach() override;
27 dap::LaunchRequest launchDAP(const QMap<QString, QVariant> &param) override;
28 QString build(const QString& projectPath) override;
29 QString getProjectFile(const QString& projectPath) override;
30 QMap<QString, QVariant> getDebugArguments(const dpfservice::ProjectInfo &projectInfo,
31 const QString &currentFile) override;
32
33 dpfservice::RunCommandInfo getRunArguments(const dpfservice::ProjectInfo &projectInfo,
34 const QString &currentFile) override;
35
36signals:
37
38private slots:
39
40private:
41 CMakeGeneratorPrivate *const d;
42};
43
44#endif // CMAKEGENERATOR_H
45