Determine the set of modules to skip in qmake

Change-Id: I421f50e5944962eae41700180ee49a916a2a023d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
Lars Knoll 2016-06-23 12:37:05 +02:00
parent c167308c5d
commit e9ba9609f1
3 changed files with 27 additions and 15 deletions

14
configure vendored
View File

@ -483,7 +483,6 @@ QT_ALL_BUILD_PARTS=" libs tools examples tests "
QT_DEFAULT_BUILD_PARTS="libs tools examples" QT_DEFAULT_BUILD_PARTS="libs tools examples"
CFG_BUILD_PARTS="" CFG_BUILD_PARTS=""
CFG_NOBUILD_PARTS="" CFG_NOBUILD_PARTS=""
CFG_SKIP_MODULES=""
CFG_ANDROID_STYLE_ASSETS=yes CFG_ANDROID_STYLE_ASSETS=yes
XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++" XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
@ -742,14 +741,6 @@ while [ "$#" -gt 0 ]; do
CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL" CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
fi fi
;; ;;
skip)
VAL=qt${VAL#qt}
if ! [ -d $relpath/../$VAL ]; then
echo "Attempting to skip non-existent module $VAL." >&2
exit 1
fi
CFG_SKIP_MODULES="$CFG_SKIP_MODULES $VAL"
;;
sdk) sdk)
if [ "$BUILD_ON_MAC" = "yes" ]; then if [ "$BUILD_ON_MAC" = "yes" ]; then
DeviceVar set !host_build:QMAKE_MAC_SDK "$VAL" DeviceVar set !host_build:QMAKE_MAC_SDK "$VAL"
@ -1369,10 +1360,6 @@ fi
if [ "$XPLATFORM_IOS" = "yes" ] || [ "$XPLATFORM_TVOS" = "yes" ]; then if [ "$XPLATFORM_IOS" = "yes" ] || [ "$XPLATFORM_TVOS" = "yes" ]; then
CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS examples" CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS examples"
CFG_SKIP_MODULES="$CFG_SKIP_MODULES qtdoc qtmacextras qtserialport qtwebkit qtwebkit-examples"
if [ "$XPLATFORM_TVOS" = "yes" ]; then
CFG_SKIP_MODULES="$CFG_SKIP_MODULES qtscript"
fi
fi fi
@ -1969,7 +1956,6 @@ cat > "$outpath/config.tests/configure.cfg" <<EOF
# Feature defaults set by configure command line # Feature defaults set by configure command line
config.input.qt_build_parts = $CFG_BUILD_PARTS config.input.qt_build_parts = $CFG_BUILD_PARTS
config.input.extra_features = $CFG_FEATURES config.input.extra_features = $CFG_FEATURES
config.input.skip_modules = $CFG_SKIP_MODULES
config.input.qt_edition = $Edition config.input.qt_edition = $Edition
config.input.qt_licheck = $Licheck config.input.qt_licheck = $Licheck
config.input.qt_release_date = $ReleaseDate config.input.qt_release_date = $ReleaseDate

View File

@ -273,6 +273,11 @@
"test": "unix/bsymbolic_functions.test", "test": "unix/bsymbolic_functions.test",
"args": "$$QMAKE_CXX yes" "args": "$$QMAKE_CXX yes"
}, },
"skip_modules": {
"description": "modules to skip",
"type": "skipModules",
"log": "value"
},
"dlopen": { "dlopen": {
"description": "dlopen() in libc", "description": "dlopen() in libc",
"type": "compile", "type": "compile",
@ -1775,7 +1780,7 @@
"output": [ { "type": "varAppend", "name": "QT_HOST_CFLAGS_DBUS", "value": "tests.host-dbus.cflags" } ] "output": [ { "type": "varAppend", "name": "QT_HOST_CFLAGS_DBUS", "value": "tests.host-dbus.cflags" } ]
}, },
"skip_modules": { "skip_modules": {
"output": [ { "type": "varAssign", "name": "QT_SKIP_MODULES", "value": "input.skip_modules" } ] "output": [ { "type": "varAssign", "name": "QT_SKIP_MODULES", "value": "tests.skip_modules.value" } ]
}, },
"qt_build_parts": { "qt_build_parts": {
"description": "Qt build parts", "description": "Qt build parts",

View File

@ -186,6 +186,27 @@ defineTest(qtConfTest_neon) {
return(false) return(false)
} }
defineTest(qtConfTest_skipModules) {
skip =
ios|tvos {
skip += qtdoc qtmacextras qtserialport qtwebkit qtwebkit-examples
tvos: skip += qtscript
}
for (m, config.input.skip) {
# normalize the command line input
m ~= s/^(qt)?/qt/
!exists($$_PRO_FILE_PWD_/../$$m) {
qtConfAddError("-skip command line argument called with non-existent module '$$m'.")
return(false)
}
skip += $$m
}
$${1}.value = $$unique(skip)
export($${1}.value)
return(true)
}
defineTest(qtConfTest_openssl) { defineTest(qtConfTest_openssl) {
libs = $$getenv("OPENSSL_LIBS") libs = $$getenv("OPENSSL_LIBS")