summaryrefslogtreecommitdiffstats
path: root/src/jomlib/targetexecutor.h
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@theqtcompany.com>2015-04-10 17:13:43 +0200
committerJoerg Bornemann <joerg.bornemann@theqtcompany.com>2015-05-11 10:21:25 +0000
commita17aa85c4ae30d9a44fc2b10e919d94c3dfa3af3 (patch)
tree61e0a4b4f6d3b981e4931d69d5156ebeeabf2efb /src/jomlib/targetexecutor.h
parent98a33f71e75047a529b32f3c95b9fd479873371d (diff)
implement job server
Instead of trying to block recursive jom calls, use a job server similar to what GNU make provides. Task-number: QTCREATORBUG-10846 Change-Id: I0e17bb3a4e22e911da58f90e1bebc20aa5e6c75a Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Diffstat (limited to 'src/jomlib/targetexecutor.h')
-rw-r--r--src/jomlib/targetexecutor.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/jomlib/targetexecutor.h b/src/jomlib/targetexecutor.h
index 7f61f2b..f5497d2 100644
--- a/src/jomlib/targetexecutor.h
+++ b/src/jomlib/targetexecutor.h
@@ -33,6 +33,7 @@ namespace NMakeFile {
class CommandExecutor;
class DependencyGraph;
+class JobClient;
class TargetExecutor : public QObject {
Q_OBJECT
@@ -42,28 +43,32 @@ public:
void apply(Makefile* mkfile, const QStringList& targets);
void removeTempFiles();
- bool hasPendingTargets() const;
signals:
void finished(int exitCode);
-public slots:
- void startProcesses();
-
private slots:
+ void startProcesses();
+ void buildNextTarget();
void onChildFinished(CommandExecutor*, bool commandFailed);
private:
+ int numberOfRunningProcesses() const;
void waitForProcesses();
void finishBuild(int exitCode);
+ void findNextTarget();
private:
+ ProcessEnvironment m_environment;
Makefile* m_makefile;
DependencyGraph* m_depgraph;
QList<DescriptionBlock*> m_pendingTargets;
+ JobClient *m_jobClient;
bool m_bAborted;
+ int m_jobAcquisitionCount;
QList<CommandExecutor*> m_availableProcesses;
QList<CommandExecutor*> m_processes;
+ DescriptionBlock *m_nextTarget;
bool m_allCommandsSuccessfullyExecuted;
};