summaryrefslogtreecommitdiffstats
path: root/configure.bat
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-08-20 14:34:37 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-08-20 17:44:54 +0000
commit80c2a3987a06abd850944aaa3f88974e157c4c02 (patch)
treeeb8cd3c3b5d2b2b17d3171b35682311a0b44e274 /configure.bat
parent212e2ab2a3f34d6cd72baac046fb63fc98d21d4b (diff)
Fix our usage of CMake script mode in Windows configure
This is a preparation for adding the -help argument to qt-configure-module.bat. Consider the call qt-configure-module.bat path/to/qt-module -help Internally, we called cmake ... -P .../QtWriteArgsFile.cmake path/to/qt-module -help which was supposed to separate the arguments and write them into config.opt. However, passing arbitrary arguments after "-P script.cmake" only worked by accident and is not supported. As soon as arguments are passed that are valid CMake arguments, like -help or -G, the CMake call would fail. Now, we let configure.bat and qt-configure-module.bat write the arguments as is into config.opt.in and let QtWriteArgsFile.cmake read this file, separate the arguments and write config.opt. Task-number: QTBUG-95943 Change-Id: I80f298a2aaf55b0f79fed86320a055eb2d2b6faa Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 57ad532e75f62212f24dd2791583b975d09aca9d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'configure.bat')
-rw-r--r--configure.bat3
1 files changed, 2 insertions, 1 deletions
diff --git a/configure.bat b/configure.bat
index 36fae68144..54fa2b2110 100644
--- a/configure.bat
+++ b/configure.bat
@@ -104,7 +104,8 @@ cd "%TOPQTDIR%"
rem Write config.opt if we're not currently -redo'ing
if "%rargs%" == "" (
- cmake -DOUT_FILE=config.opt -DIGNORE_ARGS=-top-level -P "%QTSRC%\cmake\QtWriteArgsFile.cmake" %*
+ echo %*>config.opt.in
+ cmake -DIN_FILE=config.opt.in -DOUT_FILE=config.opt -DIGNORE_ARGS=-top-level -P "%QTSRC%\cmake\QtWriteArgsFile.cmake"
)
rem Launch CMake-based configure