summaryrefslogtreecommitdiff
path: root/src/lib/corelib/tools/buildoptions.cpp
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@theqtcompany.com>2015-08-12 04:58:34 -0700
committerJake Petroules <jake.petroules@theqtcompany.com>2016-03-09 18:01:51 +0000
commit9fbbff3155b78bd6fe47872d93d97a899ac4f66a (patch)
tree0bd279744f4c1162d6955f58a2bec68f307ec11e /src/lib/corelib/tools/buildoptions.cpp
parent3a0ed06383a729a658b95644bb5dd1280f444b32 (diff)
downloadqbs-9fbbff3155b78bd6fe47872d93d97a899ac4f66a.tar.gz
Add an option to require transformers to generate all declared outputs.
This ensures that a successful build cannot complete without all output artifacts of all rules and transformers in the project existing (unless they are marked alwaysUpdated: false). This is undesirable to enable by default due to the potential overhead, but can be a useful debugging tool and so is provided as an option. Change-Id: I46ee49e28cc06d5aff9a3cfd520f929fef4de3f8 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'src/lib/corelib/tools/buildoptions.cpp')
-rw-r--r--src/lib/corelib/tools/buildoptions.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/lib/corelib/tools/buildoptions.cpp b/src/lib/corelib/tools/buildoptions.cpp
index fafb86404..a2d5c2db2 100644
--- a/src/lib/corelib/tools/buildoptions.cpp
+++ b/src/lib/corelib/tools/buildoptions.cpp
@@ -40,6 +40,7 @@ class BuildOptionsPrivate : public QSharedData
public:
BuildOptionsPrivate()
: maxJobCount(0), dryRun(false), keepGoing(false), forceTimestampCheck(false),
+ forceOutputCheck(false),
logElapsedTime(false), echoMode(defaultCommandEchoMode()), install(true),
removeExistingInstallation(false), onlyExecuteRules(false)
{
@@ -52,6 +53,7 @@ public:
bool dryRun;
bool keepGoing;
bool forceTimestampCheck;
+ bool forceOutputCheck;
bool logElapsedTime;
CommandEchoMode echoMode;
bool install;
@@ -240,6 +242,25 @@ void BuildOptions::setForceTimestampCheck(bool enabled)
}
/*!
+ * \brief Returns true if qbs will test whether rules and transformers actually create their
+ * declared output artifacts.
+ * The default is \c false.
+ */
+bool BuildOptions::forceOutputCheck() const
+{
+ return d->forceOutputCheck;
+}
+
+/*!
+ * \brief Controls whether qbs should test whether rules and transformers actually create their
+ * declared output artifacts. Enabling this may introduce some small I/O overhead during the build.
+ */
+void BuildOptions::setForceOutputCheck(bool enabled)
+{
+ d->forceOutputCheck = enabled;
+}
+
+/*!
* \brief Returns true iff the time the operation takes will be logged.
* The default is \c false.
*/