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 | |
11 | class CMakeGeneratorPrivate; |
12 | class CMakeGenerator : public dpfservice::LanguageGenerator |
13 | { |
14 | Q_OBJECT |
15 | public: |
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> ¶m, QString &retMsg) override; |
23 | bool requestDAPPort(const QString &uuid, const QMap<QString, QVariant> ¶m, QString &retMsg) override; |
24 | bool isNeedBuild() override; |
25 | bool isTargetReady() override; |
26 | bool isLaunchNotAttach() override; |
27 | dap::LaunchRequest launchDAP(const QMap<QString, QVariant> ¶m) 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 ¤tFile) override; |
32 | |
33 | dpfservice::RunCommandInfo getRunArguments(const dpfservice::ProjectInfo &projectInfo, |
34 | const QString ¤tFile) override; |
35 | |
36 | signals: |
37 | |
38 | private slots: |
39 | |
40 | private: |
41 | CMakeGeneratorPrivate *const d; |
42 | }; |
43 | |
44 | #endif // CMAKEGENERATOR_H |
45 | |