rewrite makespec verification with qmake based system
cleaner, and covers windows as well. Change-Id: I0e884909a3f49610fab750ba1ef6112f43e5d5d1 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
parent
97b856b788
commit
d90db0f136
1
config.tests/common/verifyspec/verifyspec.cpp
Normal file
1
config.tests/common/verifyspec/verifyspec.cpp
Normal file
@ -0,0 +1 @@
|
||||
int main(int, char **) {}
|
1
config.tests/common/verifyspec/verifyspec.pro
Normal file
1
config.tests/common/verifyspec/verifyspec.pro
Normal file
@ -0,0 +1 @@
|
||||
SOURCES = verifyspec.cpp
|
17
configure
vendored
17
configure
vendored
@ -398,10 +398,7 @@ BUILD_ON_MAC=no
|
||||
if [ -d /System/Library/Frameworks/Carbon.framework ]; then
|
||||
BUILD_ON_MAC=yes
|
||||
fi
|
||||
DEV_NULL=/dev/null
|
||||
if [ "$OSTYPE" = "msys" ]; then
|
||||
DEV_NULL=/tmp/empty-file
|
||||
echo "" > $DEV_NULL
|
||||
relpath=`(cd "$relpath"; pwd -W)`
|
||||
outpath=`pwd -W`
|
||||
fi
|
||||
@ -1863,20 +1860,6 @@ else
|
||||
HOST_VARS_FILE="$HOST_VARS_OUTFILE"
|
||||
fi
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Verify makespec
|
||||
#-------------------------------------------------------------------------------
|
||||
QMAKE_OUTPUT=`"$CFG_QMAKE_PATH" -qtconf "$QTCONFFILE" -E -nocache -spec "$XQMAKESPEC" "QT=" $DEV_NULL 2>&1`
|
||||
if [ $? != "0" ]; then
|
||||
echo "Failed to process makespec for platform '$XPLATFORM'"
|
||||
if [ "$OPT_VERBOSE" = "yes" ]; then
|
||||
echo "$QMAKE_OUTPUT"
|
||||
else
|
||||
echo "Turn on verbose messaging (-v) to see the final report."
|
||||
fi
|
||||
exit 101
|
||||
fi
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# run configure tests
|
||||
#-------------------------------------------------------------------------------
|
||||
|
@ -785,7 +785,8 @@
|
||||
|
||||
"testTypeDependencies": {
|
||||
"linkerSupportsFlag": [ "use_gold_linker" ],
|
||||
"compile": [ "shared", "use_gold_linker", "compiler-flags", "gcc-sysroot", "qmakeargs" ],
|
||||
"verifySpec": [ "shared", "use_gold_linker", "compiler-flags", "gcc-sysroot", "qmakeargs" ],
|
||||
"compile": [ "verifyspec" ],
|
||||
"detectPkgConfig": [ "cross_compile" ],
|
||||
"library": [ "pkg-config" ],
|
||||
"getPkgConfigVariable": [ "pkg-config" ],
|
||||
@ -800,6 +801,11 @@
|
||||
},
|
||||
|
||||
"tests": {
|
||||
"verifyspec": {
|
||||
"description": "valid makespec",
|
||||
"type": "verifySpec",
|
||||
"test": "common/verifyspec"
|
||||
},
|
||||
"architecture": {
|
||||
"description": "target architecture",
|
||||
"type": "architecture",
|
||||
@ -1301,6 +1307,10 @@
|
||||
"pkgConfig"
|
||||
]
|
||||
},
|
||||
"verifyspec": {
|
||||
"description": "Have valid makespec",
|
||||
"condition": "tests.verifyspec"
|
||||
},
|
||||
|
||||
"developer-build": {
|
||||
"description": "Developer build",
|
||||
|
@ -684,6 +684,13 @@ defineTest(qtConfTest_compile) {
|
||||
return(false)
|
||||
}
|
||||
|
||||
defineTest(qtConfTest_verifySpec) {
|
||||
qtConfTest_compile($$1): return(true)
|
||||
qtConfAddError("Cannot compile a minimal program. The toolchain or QMakeSpec is broken.", log)
|
||||
qtConfPrintReport()
|
||||
error()
|
||||
}
|
||||
|
||||
defineTest(qtConfTest_files) {
|
||||
for(i, $${1}.files._KEYS_) {
|
||||
f = $$eval($${1}.files.$${i})
|
||||
|
Loading…
Reference in New Issue
Block a user