summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-08-18 11:43:37 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2020-08-20 17:07:09 +0200
commit45d3c75ab6f29e88637363869a3b0be8df731dec (patch)
tree6a25a5de222c0a94c093e4b03d49034dd54fee7e /configure
parentc4d3e5d7d31d4cd2bfec35ba8c86aeb7329288b7 (diff)
CMake: Fix configure -redo on Unix
One can now place a config.opt file in an otherwise empty build directory and call 'configure -redo'. If config.opt contains the -cmake argument, Qt will be built with CMake as expected. To achieve that, configure must peek into config.opt and look for the -cmake argument. Fixes: QTBUG-86097 Change-Id: I35f76caca862e5a59c2fb850e0aeb6529c826149 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure9
1 files changed, 8 insertions, 1 deletions
diff --git a/configure b/configure
index 92d290aba2..ab5f4f6991 100755
--- a/configure
+++ b/configure
@@ -558,6 +558,13 @@ while [ "$#" -gt 0 ]; do
cmake)
BUILD_WITH_CMAKE=yes
;;
+ redo)
+ if [ -f config.opt ]; then
+ if grep -e ^-cmake <config.opt; then
+ BUILD_WITH_CMAKE=yes
+ fi
+ fi
+ ;;
*)
;;
esac
@@ -915,8 +922,8 @@ handleHelp
if [ "$BUILD_WITH_CMAKE" = "yes" ]; then
checkTopLevelBuild "$@"
getOptAndQMakeCmdLines "$@"
+ optfilename=config.opt
if [ -z "$optfile" ]; then # only write optfile if not currently redoing
- optfilename=config.opt
optfilepath=${outpathPrefix}${optfilename}
if [ -f "$optfilepath" ]; then rm "$optfilepath"; fi
for arg in "$@"; do