diff options
author | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2016-05-04 16:32:00 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2016-05-04 14:45:36 +0000 |
commit | 9ead8160ac517662ebc2da918517c0125110c5b8 (patch) | |
tree | 493b188828c26aa9adee1b6b6feb5c42b5094cfb | |
parent | e2b5a900a2aa5f7772b928a8634da07ebafa88af (diff) |
Skip sanity checks by default in release mode.
They can get quite expensive, particular with null builds. Allow to re-
enable via environment variable.
Change-Id: If8368e14f97223fc0398aa1111711c4d131a2fb4
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
-rw-r--r-- | src/lib/corelib/buildgraph/buildgraph.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/corelib/buildgraph/buildgraph.cpp b/src/lib/corelib/buildgraph/buildgraph.cpp index faa82c380..662fc0b75 100644 --- a/src/lib/corelib/buildgraph/buildgraph.cpp +++ b/src/lib/corelib/buildgraph/buildgraph.cpp @@ -544,8 +544,19 @@ static void doSanityChecks(const ResolvedProjectPtr &project, } } +static bool isReleaseBuild() +{ +#ifdef QT_NO_DEBUG + return true; +#else + return false; +#endif +} + void doSanityChecks(const ResolvedProjectPtr &project, const Logger &logger) { + if (isReleaseBuild() && qgetenv("QBS_SANITY_CHECKS").isEmpty()) + return; QSet<QString> productNames; const QSet<ResolvedProductPtr> allProducts = project->allProducts().toSet(); doSanityChecks(project, allProducts, productNames, logger); |