summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-11-17 14:07:18 +0100
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-12-01 14:00:46 +0000
commit2a46300588dfddfe2ca7bcc81010f156a134d47f (patch)
treeb1cfc985a4755f4e68fb334fdef354f9f2aab05c
parentd527415ac62b062323f5ce7f10d87ec0fd43bfee (diff)
error-check dependency declarations
Change-Id: I98ad68d8be608b144c5f2ff422aaf7baab9907e8 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
-rw-r--r--qt.pro6
1 files changed, 6 insertions, 0 deletions
diff --git a/qt.pro b/qt.pro
index f1274801..be193c55 100644
--- a/qt.pro
+++ b/qt.pro
@@ -13,6 +13,12 @@ defineReplace(moduleName) {
# Arguments: module name, [mandatory deps], [optional deps], [project file]
defineTest(addModule) {
+ for(d, $$list($$2 $$3)): \
+ !contains(MODULES, $$d): \
+ error("'$$1' depends on not (yet) declared '$$d'.")
+ MODULES += $$1
+ export(MODULES)
+
contains(QT_SKIP_MODULES, $$1): return(false)
!isEmpty(QT_BUILD_MODULES):!contains(QT_BUILD_MODULES, $$1): return(false)
mod = $$moduleName($$1)