diff options
| author | Joerg Bornemann <joerg.bornemann@digia.com> | 2012-11-13 11:55:02 +0100 |
|---|---|---|
| committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2012-11-13 15:21:29 +0100 |
| commit | 96db5a6b8d957e30379a8bba2ee47dae5387c4d3 (patch) | |
| tree | e39beb62ed41c41f41392d4f0996024f0362ce0d /src/lib/buildgraph/artifact.cpp | |
| parent | fdca8c555fdbb224bbffbf16ea1d42a155579b5e (diff) | |
| download | qbs-96db5a6b8d957e30379a8bba2ee47dae5387c4d3.tar.gz | |
introduce property RuleArtifact.alwaysUpdated
RuleArtifact.alwaysUpdated is a bool property that specifies, if an
output artifact will always be updated by its transformer. The default
value is true.
When finishing the build of artifact A, qbs will retrieve the timestamp
of A, if and only if A.alwaysUpdated is false. Otherwise the actual
timestamp of A is ignored and the current time is used.
When determining whether to run a transformer, only the timestamps of
artifacts that have alwaysUpdated set to true are taken into account.
Transformers whose outputs have all alwaysUpdated == false are always
executed.
Change-Id: I19d2626f17640a813f862980fafd507a13fcca95
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Diffstat (limited to 'src/lib/buildgraph/artifact.cpp')
| -rw-r--r-- | src/lib/buildgraph/artifact.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/buildgraph/artifact.cpp b/src/lib/buildgraph/artifact.cpp index 367f30234..b48cb0b73 100644 --- a/src/lib/buildgraph/artifact.cpp +++ b/src/lib/buildgraph/artifact.cpp @@ -61,6 +61,7 @@ Artifact::Artifact(BuildProject *p) , buildState(Untouched) , inputsScanned(false) , timestampRetrieved(false) + , alwaysUpdated(true) { } @@ -80,10 +81,13 @@ void Artifact::load(PersistentPool &pool) fileTags = pool.idLoadStringSet(); properties = pool.idLoadS<PropertyMap>(); transformer = pool.idLoadS<Transformer>(); + unsigned char c; pool.stream() >> artifactType >> timestamp - >> autoMocTimestamp; + >> autoMocTimestamp + >> c; + alwaysUpdated = c; } void Artifact::store(PersistentPool &pool) const @@ -95,7 +99,8 @@ void Artifact::store(PersistentPool &pool) const pool.stream() << artifactType << timestamp - << autoMocTimestamp; + << autoMocTimestamp + << static_cast<unsigned char>(alwaysUpdated); } } // namespace Internal |
