Restore top-level build with a separate function

We have other helper functions like this, and the way they are made
to work is to pass the script's arguments down to them.

Change-Id: I3b80e82a2fb3d6e6a65b2deca3b60e4e0dd8de07
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
Ville Voutilainen 2019-09-30 11:40:35 +03:00
parent b86630b4b0
commit 1569c6d85e

33
configure vendored
View File

@ -97,6 +97,21 @@ fi
CFG_TOPLEVEL=
outpathPrefix=
checkTopLevelBuild()
{
relpathMangled=$relpath
if [ x"$1" = x"-top-level" ]; then
CFG_TOPLEVEL=yes
relpathMangled=`dirname "$relpath"`
outpathPrefix=../
else
if [ -f ../.qmake.super ]; then
echo >&2 "ERROR: You cannot configure qtbase separately within a top-level build."
exit 1
fi
fi
}
CMAKE_CMDLINE=
getCMakeCmdLine()
{
@ -157,6 +172,9 @@ SAVED_IFS=$IFS
IFS='
'
for i in "$@"; do
if [ x"$i" = x"-top-level" ]; then
continue
fi
case $i in
-redo|--redo)
optfile=${outpathPrefix}config.opt
@ -967,20 +985,7 @@ else
findAwk
findMake
checkQMakeEnv
relpathMangled=$relpath
if [ x"$1" = x"-top-level" ]; then
CFG_TOPLEVEL=yes
relpathMangled=`dirname "$relpath"`
outpathPrefix=../
shift
else
if [ -f ../.qmake.super ]; then
echo >&2 "ERROR: You cannot configure qtbase separately within a top-level build."
exit 1
fi
fi
checkTopLevelBuild $@
getOptAndQMakeCmdLines $@
detectOperatingSystem
maybeVerifyXcode