summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-09-17 12:16:47 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2020-09-22 22:20:43 +0200
commit25cc901f049cdabcffda02b640a9a684fca8caa4 (patch)
tree873b30b07e50e3b155f5468eac7e6c0d71eeb343 /configure
parent8d4eb292b2e8fc14437db97febdc2eebe36ed3ce (diff)
CMake: Fix configure -redo for top-level builds
When re-doing in a top-level build, we did not read the config.opt file from the top-level directory. Also, the config.opt file should not contain the -top-level argument. This is an internal option, and on Windows, it was already missing. The information whether we're doing a top-level build is now passed in the CMake variable TOP_LEVEL. Change-Id: Iaecd7306a4b6d9ad494684c201cf12f8e74d684b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure14
1 files changed, 9 insertions, 5 deletions
diff --git a/configure b/configure
index ab5f4f6991..328a9e72e7 100755
--- a/configure
+++ b/configure
@@ -559,8 +559,8 @@ while [ "$#" -gt 0 ]; do
BUILD_WITH_CMAKE=yes
;;
redo)
- if [ -f config.opt ]; then
- if grep -e ^-cmake <config.opt; then
+ if [ -f ${outpathPrefix}config.opt ]; then
+ if grep -e ^-cmake <${outpathPrefix}config.opt >/dev/null 2>&1; then
BUILD_WITH_CMAKE=yes
fi
fi
@@ -917,31 +917,35 @@ else
fi
}
+checkTopLevelBuild "$@"
parseCommandline "$@"
handleHelp
if [ "$BUILD_WITH_CMAKE" = "yes" ]; then
- checkTopLevelBuild "$@"
getOptAndQMakeCmdLines "$@"
optfilename=config.opt
if [ -z "$optfile" ]; then # only write optfile if not currently redoing
optfilepath=${outpathPrefix}${optfilename}
if [ -f "$optfilepath" ]; then rm "$optfilepath"; fi
for arg in "$@"; do
+ if [ "$arg" = "-top-level" ]; then
+ continue
+ fi
echo $arg >> "$optfilepath"
done
fi
+ top_level_arg=
if [ -n "$CFG_TOPLEVEL" ]; then
+ top_level_arg=-DTOP_LEVEL=TRUE
cd ..
fi
- cmake "-DOPTFILE=$optfilename" -P "$relpath/cmake/QtProcessConfigureArgs.cmake"
+ cmake "-DOPTFILE=$optfilename" $top_level_arg -P "$relpath/cmake/QtProcessConfigureArgs.cmake"
else
findPerl
findAwk
findMake
checkQMakeEnv
- checkTopLevelBuild "$@"
getOptAndQMakeCmdLines "$@"
detectOperatingSystem
maybeVerifyXcode