From d7a0d243a984f032a8f838e7b44297eac81ef190 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 25 Oct 2013 21:04:35 +0200 Subject: validate qconfig-*.h against qfeatures.txt Change-Id: I59b7e30cfaa2b1bf2c5d4a3e04b5169f3c9439b5 Reviewed-by: Joerg Bornemann --- qtbase.pro | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'qtbase.pro') diff --git a/qtbase.pro b/qtbase.pro index 3fc759615b..d608695970 100644 --- a/qtbase.pro +++ b/qtbase.pro @@ -145,6 +145,17 @@ FWD_FEATURES_H = \ '$${LITERAL_HASH}include "../../src/corelib/global/qfeatures.h"' write_file($$OUT_PWD/include/QtCore/qfeatures.h, FWD_FEATURES_H)|error("Aborting.") +lines = $$cat($$absolute_path($$QT_QCONFIG_PATH, $$PWD/src/corelib/global), lines) +for (line, lines) { + # We ignore all defines that don't follow the #ifndef + indent pattern. + # This makes it possible to have unchecked defines which are no features. + t = $$replace(line, "^$${LITERAL_HASH} define QT_NO_(\\S+)\\s*$", "\\1") + !isEqual(t, $$line) { + isEmpty(features.$${t}.name): \ + error("$$QT_QCONFIG_PATH disables unknown feature $$t") + } +} + #mkspecs mkspecs.path = $$[QT_HOST_DATA]/mkspecs mkspecs.files = \ -- cgit v1.2.3