Skip to content

Commit

Permalink
Determine the set of modules to skip in qmake
Browse files Browse the repository at this point in the history
Change-Id: I421f50e5944962eae41700180ee49a916a2a023d
Reviewed-by: Oswald Buddenhagen <[email protected]>
  • Loading branch information
laknoll committed Jul 2, 2016
1 parent c167308 commit e9ba960
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 15 deletions.
14 changes: 0 additions & 14 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,6 @@ QT_ALL_BUILD_PARTS=" libs tools examples tests "
QT_DEFAULT_BUILD_PARTS="libs tools examples"
CFG_BUILD_PARTS=""
CFG_NOBUILD_PARTS=""
CFG_SKIP_MODULES=""
CFG_ANDROID_STYLE_ASSETS=yes

XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
Expand Down Expand Up @@ -742,14 +741,6 @@ while [ "$#" -gt 0 ]; do
CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
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)
if [ "$BUILD_ON_MAC" = "yes" ]; then
DeviceVar set !host_build:QMAKE_MAC_SDK "$VAL"
Expand Down Expand Up @@ -1369,10 +1360,6 @@ fi

if [ "$XPLATFORM_IOS" = "yes" ] || [ "$XPLATFORM_TVOS" = "yes" ]; then
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


Expand Down Expand Up @@ -1969,7 +1956,6 @@ cat > "$outpath/config.tests/configure.cfg" <<EOF
# Feature defaults set by configure command line
config.input.qt_build_parts = $CFG_BUILD_PARTS
config.input.extra_features = $CFG_FEATURES
config.input.skip_modules = $CFG_SKIP_MODULES
config.input.qt_edition = $Edition
config.input.qt_licheck = $Licheck
config.input.qt_release_date = $ReleaseDate
Expand Down
7 changes: 6 additions & 1 deletion configure.json
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,11 @@
"test": "unix/bsymbolic_functions.test",
"args": "$$QMAKE_CXX yes"
},
"skip_modules": {
"description": "modules to skip",
"type": "skipModules",
"log": "value"
},
"dlopen": {
"description": "dlopen() in libc",
"type": "compile",
Expand Down Expand Up @@ -1775,7 +1780,7 @@
"output": [ { "type": "varAppend", "name": "QT_HOST_CFLAGS_DBUS", "value": "tests.host-dbus.cflags" } ]
},
"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": {
"description": "Qt build parts",
Expand Down
21 changes: 21 additions & 0 deletions configure.pri
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,27 @@ defineTest(qtConfTest_neon) {
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) {
libs = $$getenv("OPENSSL_LIBS")

Expand Down

0 comments on commit e9ba960

Please sign in to comment.