aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2016-12-19 14:42:35 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2016-12-19 15:07:52 +0000
commita7afa6a9ad312bacf528fc3e97688c125f151abf (patch)
tree87a1e07f38f81186fd9575dcb026cbba8f04ccf7
parent652f13e8fe428a525f48012f12f6a8c01e1c49fd (diff)
Do the buildgraph sanity checks only on demand
This procedure is too slow to enable by default even in debug builds. Change-Id: Ib77bba191841d3d50fbf5be482021b71dfa19e08 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r--src/lib/corelib/buildgraph/buildgraph.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/lib/corelib/buildgraph/buildgraph.cpp b/src/lib/corelib/buildgraph/buildgraph.cpp
index 3929f676a..36e660d8a 100644
--- a/src/lib/corelib/buildgraph/buildgraph.cpp
+++ b/src/lib/corelib/buildgraph/buildgraph.cpp
@@ -530,18 +530,9 @@ 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())
+ if (qEnvironmentVariableIsEmpty("QBS_SANITY_CHECKS"))
return;
QSet<QString> productNames;
const QSet<ResolvedProductPtr> allProducts = project->allProducts().toSet();