diff options
author | Joerg Bornemann <joerg.bornemann@digia.com> | 2014-02-10 18:08:01 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2014-02-13 15:33:27 +0100 |
commit | e73f60919079fc7cb0f0ad6d50b1a364c7b0d2a6 (patch) | |
tree | 3ce15f1f9b336063d591999ce325ce28a6e21320 /src/lib/corelib/buildgraph/productbuilddata.h | |
parent | a3634a6bbb193c47cdec887a6b29356c979961aa (diff) |
support transformers with an unknown number of outputs
To support different types of nodes in the build graph, we introduce
the base class BuildGraphNode. Artifact now derives from BuildGraphNode.
A RuleNode class is introduced that represents a rule in the build graph.
Rules are applied in the build phase and not in a pre-build phase
anymore.
The handling of moc has been revisited. The fixed automoc pre-build
phase is no more.
This is the squashed merge of a feature branch.
Task-number: QBS-370
Change-Id: If27cdc51cba8c9542e4282c2caa456faa723aeff
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Diffstat (limited to 'src/lib/corelib/buildgraph/productbuilddata.h')
-rw-r--r-- | src/lib/corelib/buildgraph/productbuilddata.h | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/src/lib/corelib/buildgraph/productbuilddata.h b/src/lib/corelib/buildgraph/productbuilddata.h index 1e4b4402e..10b4655be 100644 --- a/src/lib/corelib/buildgraph/productbuilddata.h +++ b/src/lib/corelib/buildgraph/productbuilddata.h @@ -30,8 +30,10 @@ #define QBS_PRODUCTBUILDDATA_H #include "artifactset.h" +#include "nodeset.h" +#include "rescuableartifactdata.h" +#include <language/filetags.h> #include <language/forward_decls.h> - #include <tools/persistentobject.h> #include <QList> @@ -39,6 +41,7 @@ namespace qbs { namespace Internal { + class Logger; class ProductBuildData : public PersistentObject @@ -46,17 +49,33 @@ class ProductBuildData : public PersistentObject public: ~ProductBuildData(); - QSet<Artifact *> targetArtifacts; - ArtifactSet artifacts; - QList<RuleConstPtr> topSortedRules; + ArtifactSet targetArtifacts() const; + NodeSet nodes; + NodeSet roots; + + // After change tracking, this is the relevant data of artifacts that were in the build data + // of the restored product, and will potentially be re-created by our rules. + // If and when that happens, the relevant data will be copied over to the newly created + // artifact. + AllRescuableArtifactData rescuableArtifactData; // Do not store, initialized in executor. Higher prioritized artifacts are built first. unsigned int buildPriority; + typedef QHash<FileTag, ArtifactSet> ArtifactSetByFileTag; + ArtifactSetByFileTag addedArtifactsByFileTag; + ArtifactSetByFileTag removedArtifactsByFileTag; + + // TODO: Serialize. + typedef QHash<RuleConstPtr, ArtifactSet> ArtifactSetByRule; + ArtifactSetByRule artifactsWithChangedInputsPerRule; + void load(PersistentPool &pool); void store(PersistentPool &pool) const; }; +void addArtifactToSet(Artifact *artifact, ProductBuildData::ArtifactSetByFileTag &container); + } // namespace Internal } // namespace qbs |