2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
2022-12-21 10:12:09 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2019-06-05 18:09:02 +02:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2020-04-16 13:53:05 +02:00
|
|
|
#include <utils/outputformatter.h>
|
2019-06-05 18:09:02 +02:00
|
|
|
|
2020-02-28 12:44:00 +01:00
|
|
|
#include <QElapsedTimer>
|
2020-04-17 15:30:05 +02:00
|
|
|
#include <QObject>
|
|
|
|
|
#include <QStringList>
|
2019-06-05 18:09:02 +02:00
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
2022-05-13 18:22:03 +02:00
|
|
|
namespace Utils {
|
|
|
|
|
class ProcessResultData;
|
|
|
|
|
class QtcProcess;
|
|
|
|
|
}
|
2022-03-02 04:12:25 +01:00
|
|
|
|
2022-09-29 15:26:31 +02:00
|
|
|
namespace CMakeProjectManager::Internal {
|
2019-06-05 18:09:02 +02:00
|
|
|
|
2022-05-14 02:27:28 +02:00
|
|
|
class BuildDirParameters;
|
|
|
|
|
|
2021-06-08 13:40:45 +02:00
|
|
|
class CMakeProcess : public QObject
|
|
|
|
|
{
|
2019-06-05 18:09:02 +02:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
CMakeProcess();
|
|
|
|
|
~CMakeProcess();
|
|
|
|
|
|
|
|
|
|
void run(const BuildDirParameters ¶meters, const QStringList &arguments);
|
2022-05-13 18:22:03 +02:00
|
|
|
void stop();
|
2019-06-05 18:09:02 +02:00
|
|
|
|
|
|
|
|
signals:
|
2022-10-10 13:16:01 +02:00
|
|
|
void finished(int exitCode);
|
2019-06-05 18:09:02 +02:00
|
|
|
|
|
|
|
|
private:
|
2022-05-13 18:22:03 +02:00
|
|
|
void handleProcessDone(const Utils::ProcessResultData &resultData);
|
2019-06-05 18:09:02 +02:00
|
|
|
|
|
|
|
|
std::unique_ptr<Utils::QtcProcess> m_process;
|
2020-04-16 13:53:05 +02:00
|
|
|
Utils::OutputFormatter m_parser;
|
2020-02-28 12:44:00 +01:00
|
|
|
QElapsedTimer m_elapsed;
|
2019-06-05 18:09:02 +02:00
|
|
|
};
|
|
|
|
|
|
2022-09-29 15:26:31 +02:00
|
|
|
} // CMakeProjectManager::Internal
|