From 062a7dc4248904bed51dc87466ec29b407945950 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Thu, 30 Jan 2025 13:18:17 +0100 Subject: [PATCH] configure.bat: Use call when calling the helper cmake scripts If an executable has a .bat or .cmd extension, and is executed without a prepended 'call' command within a batch script, the parent batch script execution will not continue once the child process has finished. Prepending call to the command ensures that the parent batch script continues execution. This changes ensures that configuration succeeds for the use case when cmake is actually a batch script called cmake.bat or cmake.cmd. We already use 'call' in qt-configure-module, so do it also in configure. Pick-to: 6.8 6.9 Change-Id: Ia42cb71787e88c850f1cbd1fcef5b6decbdeaabf Reviewed-by: Joerg Bornemann --- configure.bat | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.bat b/configure.bat index 0c22fdccca3..7830459d4e3 100644 --- a/configure.bat +++ b/configure.bat @@ -90,12 +90,12 @@ if not defined redoing ( rem "into the file from a stream different than stdout, leading to broken or empty content." echo.%* >"%OPT_TMP_FILE_PATH%" - cmake -DIN_FILE="%OPT_TMP_FILE_PATH%" -DOUT_FILE="%OPT_FILE_PATH%" -DIGNORE_ARGS=-top-level -P "%QTSRC%\cmake\QtWriteArgsFile.cmake" + call cmake -DIN_FILE="%OPT_TMP_FILE_PATH%" -DOUT_FILE="%OPT_FILE_PATH%" -DIGNORE_ARGS=-top-level -P "%QTSRC%\cmake\QtWriteArgsFile.cmake" ) else ( echo. 2> "%OPT_TMP_FILE_PATH%" for /F "usebackq tokens=*" %%A in ("%OPT_FILE_PATH%") do echo "%%A" >> "%OPT_TMP_FILE_PATH%" - cmake -DIN_FILE="%OPT_TMP_FILE_PATH%" -DREDO_FILE="%REDO_TMP_FILE_PATH%" -DOUT_FILE="%REDO_FILE_PATH%" -DIGNORE_ARGS="-top-level;-redo;--redo" -P "%QTSRC%\cmake\QtWriteArgsFile.cmake" + call cmake -DIN_FILE="%OPT_TMP_FILE_PATH%" -DREDO_FILE="%REDO_TMP_FILE_PATH%" -DOUT_FILE="%REDO_FILE_PATH%" -DIGNORE_ARGS="-top-level;-redo;--redo" -P "%QTSRC%\cmake\QtWriteArgsFile.cmake" set OPT_FILE_PATH=%REDO_FILE_PATH% set FRESH_REQUESTED_ARG=-DFRESH_REQUESTED=TRUE @@ -104,4 +104,4 @@ if not defined redoing ( rem Launch CMake-based configure set TOP_LEVEL_ARG= if %TOPLEVEL% == true set TOP_LEVEL_ARG=-DTOP_LEVEL=TRUE -cmake -DOPTFILE="%OPT_FILE_PATH%" %TOP_LEVEL_ARG% %FRESH_REQUESTED_ARG% -P "%QTSRC%\cmake\QtProcessConfigureArgs.cmake" +call cmake -DOPTFILE="%OPT_FILE_PATH%" %TOP_LEVEL_ARG% %FRESH_REQUESTED_ARG% -P "%QTSRC%\cmake\QtProcessConfigureArgs.cmake"