2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
2016-01-15 14:57:40 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2010-12-17 16:01:08 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2008-12-02 16:19:05 +01:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2013-10-16 12:10:22 +02:00
|
|
|
#include "qmakeprojectmanager_global.h"
|
2011-07-21 15:05:52 +02:00
|
|
|
|
2018-05-14 16:39:19 +02:00
|
|
|
#include <projectexplorer/makestep.h>
|
2010-03-17 17:45:33 +01:00
|
|
|
|
2013-10-16 11:02:37 +02:00
|
|
|
namespace QmakeProjectManager {
|
2011-11-24 13:00:01 +01:00
|
|
|
|
2013-10-16 14:00:45 +02:00
|
|
|
class QmakeBuildConfiguration;
|
2009-11-26 14:43:27 +01:00
|
|
|
|
2010-12-06 13:29:18 +01:00
|
|
|
namespace Internal {
|
|
|
|
|
|
2018-05-14 16:39:19 +02:00
|
|
|
class QmakeMakeStepFactory : public ProjectExplorer::BuildStepFactory
|
2009-04-20 16:25:48 +02:00
|
|
|
{
|
|
|
|
|
public:
|
2018-05-14 16:39:19 +02:00
|
|
|
QmakeMakeStepFactory();
|
2009-04-20 16:25:48 +02:00
|
|
|
};
|
2016-05-18 12:37:29 +02:00
|
|
|
|
2009-11-26 14:43:27 +01:00
|
|
|
} //namespace Internal
|
2009-04-20 16:25:48 +02:00
|
|
|
|
2013-10-29 14:22:31 +01:00
|
|
|
class QmakeProject;
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2018-05-14 16:39:19 +02:00
|
|
|
class QMAKEPROJECTMANAGER_EXPORT QmakeMakeStep : public ProjectExplorer::MakeStep
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
2010-01-14 17:41:29 +01:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
public:
|
2018-05-14 16:39:19 +02:00
|
|
|
explicit QmakeMakeStep(ProjectExplorer::BuildStepList *bsl);
|
2009-11-26 14:43:27 +01:00
|
|
|
|
2013-10-16 14:00:45 +02:00
|
|
|
QmakeBuildConfiguration *qmakeBuildConfiguration() const;
|
2009-11-26 14:43:27 +01:00
|
|
|
|
2019-03-04 17:29:57 +01:00
|
|
|
private:
|
|
|
|
|
void finish(bool success) override;
|
2019-01-10 15:31:44 +01:00
|
|
|
bool init() override;
|
ProjectExplorer: Rework the build step run interface
Originally, the build manager used to run all build steps in a dedicated
thread. Communication between the step and the manager happened via a
QFutureInterface that was passed into the step's run() function.
Later, new steps were added that operated asynchronously, so the build
manager had to differentiate between the different kinds of steps for
starting and stopping.
These days, almost all build and deploy steps work asynchronously, which
made the QFuture-based interface look increasingly odd.
With this patch, all build steps are expected to work asynchronously, so
the build manager no longer needs to differentiate. Steps are started
and requested to stop via the run() and cancel() functions,
respectively, and emit the finished() signal when they are done. Build
step implementors no longer have to deal with a QFutureInterface. For
steps whose implementation is inherently synchronous, the BuildStep base
class offers a runInThread() function.
Change-Id: If905c68b234c5a669f6e19f43142eaa57d594803
Reviewed-by: hjk <hjk@qt.io>
2019-01-25 14:26:34 +01:00
|
|
|
void doRun() override;
|
2010-04-09 15:04:20 +02:00
|
|
|
|
2015-06-18 15:14:06 +02:00
|
|
|
bool m_scriptTarget = false;
|
2011-03-25 17:20:27 +01:00
|
|
|
QString m_makeFileToCheck;
|
2019-03-04 17:29:57 +01:00
|
|
|
bool m_unalignedBuildDir;
|
2008-12-02 12:01:29 +01:00
|
|
|
};
|
|
|
|
|
|
2013-10-29 18:24:57 +01:00
|
|
|
} // QmakeProjectManager
|