aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/corelib/buildgraph/artifactset.cpp13
-rw-r--r--src/lib/corelib/buildgraph/artifactset.h3
-rw-r--r--src/lib/corelib/buildgraph/rulenode.cpp11
3 files changed, 27 insertions, 0 deletions
diff --git a/src/lib/corelib/buildgraph/artifactset.cpp b/src/lib/corelib/buildgraph/artifactset.cpp
index 0010e81fe..eea4ccf65 100644
--- a/src/lib/corelib/buildgraph/artifactset.cpp
+++ b/src/lib/corelib/buildgraph/artifactset.cpp
@@ -53,6 +53,19 @@ ArtifactSet &ArtifactSet::unite(const ArtifactSet &other)
return *this;
}
+QStringList ArtifactSet::toStringList() const
+{
+ QStringList sl;
+ foreach (Artifact *a, *this)
+ sl += a->filePath();
+ return sl;
+}
+
+QString ArtifactSet::toString() const
+{
+ return QLatin1Char('[') + toStringList().join(QLatin1String(", ")) + QLatin1Char(']');
+}
+
ArtifactSet ArtifactSet::fromNodeSet(const NodeSet &nodes)
{
ArtifactSet result;
diff --git a/src/lib/corelib/buildgraph/artifactset.h b/src/lib/corelib/buildgraph/artifactset.h
index 696859649..5361d706f 100644
--- a/src/lib/corelib/buildgraph/artifactset.h
+++ b/src/lib/corelib/buildgraph/artifactset.h
@@ -31,6 +31,7 @@
#define QBS_ARTIFACTSET_H
#include <QSet>
+#include <QStringList>
namespace qbs {
namespace Internal {
@@ -46,6 +47,8 @@ public:
ArtifactSet(const QSet<Artifact *> &other);
ArtifactSet &unite(const ArtifactSet &other);
+ QStringList toStringList() const;
+ QString toString() const;
static ArtifactSet fromNodeSet(const NodeSet &nodes);
static ArtifactSet fromNodeList(const QList<Artifact *> &lst);
diff --git a/src/lib/corelib/buildgraph/rulenode.cpp b/src/lib/corelib/buildgraph/rulenode.cpp
index 3ea324238..4bf027bfa 100644
--- a/src/lib/corelib/buildgraph/rulenode.cpp
+++ b/src/lib/corelib/buildgraph/rulenode.cpp
@@ -70,6 +70,17 @@ void RuleNode::apply(const Logger &logger, const ArtifactSet &changedInputs,
const ArtifactSet removedInputs = m_oldInputArtifacts - allCompatibleInputs;
result->upToDate = changedInputs.isEmpty() && addedInputs.isEmpty() && removedInputs.isEmpty();
+ if (logger.traceEnabled()) {
+ logger.qbsTrace()
+ << "[BG] consider " << (m_rule->isDynamic() ? "dynamic " : "")
+ << (m_rule->multiplex ? "multiplex " : "")
+ << "rule node " << m_rule->toString()
+ << "\n\tchanged: " << changedInputs.toString()
+ << "\n\tcompatible: " << allCompatibleInputs.toString()
+ << "\n\tadded: " << addedInputs.toString()
+ << "\n\tremoved: " << removedInputs.toString();
+ }
+
ArtifactSet inputs = changedInputs;
if (product->isMarkedForReapplication(m_rule)) {
QBS_CHECK(m_rule->multiplex);