diff options
author | Amir Masoud Abdol <amirmasoudabdol@icloud.com> | 2022-11-11 14:48:57 +0100 |
---|---|---|
committer | Amir Masoud Abdol <amirmasoudabdol@icloud.com> | 2022-12-01 02:23:51 +0100 |
commit | 60968090adfc7dca78b9d60a0fe79cab4e2e6937 (patch) | |
tree | e3a6406fa77d0cc45c74021786190ff8f6d6a237 /configure.bat | |
parent | 4fb96669e33c9e1e3edc1cf2e472f921ddee6484 (diff) |
Update -redo option such that it removes CMakeCache.txt and CMakeFiles/
In the case of re-doing, `configure` and `configure.bat` pass an extra
parameter to the `QtProcessConfigureArgs.cmake`. As a result, CMake
removes CMakeCache.txt and CMakeFiles/ before the reconfiguration. If
the user is using CMake 3.24 or newer, this is achieved by passing
the `--fresh` option to CMake call. In older CMake(s), CMakeCache.txt
and CMakeFiles/ found in CMAKE_BINARY_DIR will be removed using a
file(REMOVE_RECURSIVE call.
[ChangeLog] The -redo option now additionally removes existing
CMakeCache.txt file, and CMakeFiles/ directory, and recreates them from
scratch.
Task-number: QTBUG-108287
Change-Id: I11a5c8f9df1247d11eb7097552e6764463583346
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'configure.bat')
-rw-r--r-- | configure.bat | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/configure.bat b/configure.bat index 1fb822d60f..e93e0af318 100644 --- a/configure.bat +++ b/configure.bat @@ -78,12 +78,15 @@ goto doneargs cd "%TOPQTDIR%" rem Write config.opt if we're not currently -redo'ing +set FRESH_REQUESTED_ARG= if "!rargs!" == "" ( echo.%*>config.opt.in cmake -DIN_FILE=config.opt.in -DOUT_FILE=config.opt -DIGNORE_ARGS=-top-level -P "%QTSRC%\cmake\QtWriteArgsFile.cmake" +) else if NOT "!rargs!" == "" ( + set FRESH_REQUESTED_ARG=-DFRESH_REQUESTED=TRUE ) rem Launch CMake-based configure set TOP_LEVEL_ARG= if %TOPLEVEL% == true set TOP_LEVEL_ARG=-DTOP_LEVEL=TRUE -cmake -DOPTFILE=config.opt %TOP_LEVEL_ARG% -P "%QTSRC%\cmake\QtProcessConfigureArgs.cmake" +cmake -DOPTFILE=config.opt %TOP_LEVEL_ARG% %FRESH_REQUESTED_ARG% -P "%QTSRC%\cmake\QtProcessConfigureArgs.cmake" |