summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-12-22 13:12:02 -0800
committerThiago Macieira <thiago.macieira@intel.com>2015-04-17 00:54:45 +0000
commit6668f5becfb8fcb6d10e42495c6ea5cdba2d15c5 (patch)
treeec4eed8728f21dbbf94c45ea3a7907345962946b /configure
parent964ccc58534aac436529007000d1c38d76c88834 (diff)
Implement a more direct headersclean check
Test each include file directly, instead of doing a large #include. This verifies that each header is compilable on its own. One big advantage of doing it via a special compiler in qmake is that we skip pre-compiled headers, which has hidden build errors in the past. This solution is implemented by making syncqt produce a second list of headers. This list is the same as the list of headers in the source code to be installed, minus the headers that declare themselves to be unclean, via the pragma: #pragma qt_sync_skip_header_check This mechanism is applied only for public libraries (skipping QtPlatformSupport, an internal_module). This test is enabled only for -developer-builds of Qt because it increases the compilation time. On QtTest: the library only links to QtCore, but it has two headers that provide inline-only functionality by including QtGui and QtWidgets headers (namely, qtest_gui.h and qtest_widget.h). If those two modules aren't getting compiled due to -no-gui or -no-widgets to configure, we need to remove the respective headers from the list of headers to be checked. If they are being built, then we need to make QtTest's build wait for the headers to be generated and that happens when qmake is first run inside the src/gui and src/widgets directories. Change-Id: I57d64bd697a92367c8464c073a42e4d142a9a15f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure20
1 files changed, 18 insertions, 2 deletions
diff --git a/configure b/configure
index 4addf22896..03421dfc4c 100755
--- a/configure
+++ b/configure
@@ -762,6 +762,7 @@ QPA_PLATFORM_GUARD=yes
CFG_CXX11=auto
CFG_DIRECTWRITE=no
CFG_WERROR=auto
+CFG_HEADERSCLEAN=auto
CFG_QREAL=double
OPT_MAC_SDK=
COMMERCIAL_USER=ask
@@ -2240,6 +2241,13 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_OPT=yes
fi
;;
+ headersclean)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_HEADERSCLEAN="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
xkb-config-root)
CFG_XKB_CONFIG_ROOT="$VAL"
;;
@@ -6712,8 +6720,16 @@ if [ "$CFG_DEV" = "yes" ]; then
if [ "$CFG_WERROR" != "no" ]; then
QMAKE_CONFIG="$QMAKE_CONFIG warnings_are_errors"
fi
-elif [ "$CFG_WERROR" = "yes" ]; then
- QMAKE_CONFIG="$QMAKE_CONFIG warnings_are_errors"
+ if [ "$CFG_HEADERSCLEAN" != "no" ]; then
+ QMAKE_CONFIG="$QMAKE_CONFIG headersclean"
+ fi
+else
+ if [ "$CFG_WERROR" = "yes" ]; then
+ QMAKE_CONFIG="$QMAKE_CONFIG warnings_are_errors"
+ fi
+ if [ "$CFG_HEADERSCLEAN" = "yes" ]; then
+ QMAKE_CONFIG="$QMAKE_CONFIG headersclean"
+ fi
fi
cat >>"$QTCONFIG.tmp" <<EOF