diff options
-rw-r--r-- | src/lib/buildgraph/executor.cpp | 18 | ||||
-rw-r--r-- | src/lib/buildgraph/executor.h | 1 |
2 files changed, 9 insertions, 10 deletions
diff --git a/src/lib/buildgraph/executor.cpp b/src/lib/buildgraph/executor.cpp index 14afff895..b222daade 100644 --- a/src/lib/buildgraph/executor.cpp +++ b/src/lib/buildgraph/executor.cpp @@ -259,14 +259,6 @@ void Executor::setBuildOptions(const BuildOptions &buildOptions) job->setDryRun(m_buildOptions.dryRun); } -bool Executor::isLeaf(Artifact *artifact) -{ - foreach (Artifact *child, artifact->children) - if (child->buildState != Artifact::Built) - return false; - return true; -} - static void markAsOutOfDateBottomUp(Artifact *artifact) { if (artifact->buildState == Artifact::Untouched) @@ -474,6 +466,14 @@ void Executor::execute(Artifact *artifact) job->run(artifact->transformer.data(), artifact->product); } +static bool allChildrenBuilt(Artifact *artifact) +{ + foreach (Artifact *child, artifact->children) + if (child->buildState != Artifact::Built) + return false; + return true; +} + void Executor::finishArtifact(Artifact *leaf) { if (qbsLogLevel(LoggerTrace)) @@ -487,7 +487,7 @@ void Executor::finishArtifact(Artifact *leaf) continue; } - if (isLeaf(parent)) { + if (allChildrenBuilt(parent)) { m_leaves.insert(parent, hashDummy); if (qbsLogLevel(LoggerTrace)) qbsTrace() << "[EXEC] finishArtifact adds leaf " << fileName(parent) << " " << toString(parent->buildState); diff --git a/src/lib/buildgraph/executor.h b/src/lib/buildgraph/executor.h index 2012b362b..390ec8566 100644 --- a/src/lib/buildgraph/executor.h +++ b/src/lib/buildgraph/executor.h @@ -95,7 +95,6 @@ protected: void updateBuildGraph_impl(Artifact *artifact, Artifact::BuildState buildState, QSet<Artifact *> &seenArtifacts); void doOutOfDateCheck(); void doOutOfDateCheck(Artifact *root); - static bool isLeaf(Artifact *artifact); void initLeaves(const QList<Artifact *> &changedArtifacts); void initLeavesTopDown(Artifact *artifact, QSet<Artifact *> &seenArtifacts); bool run(); |