diff options
author | Amir Masoud Abdol <amir.abdol@qt.io> | 2023-04-17 12:12:38 +0200 |
---|---|---|
committer | Amir Masoud Abdol <amir.abdol@qt.io> | 2023-04-17 23:32:34 +0200 |
commit | bafe9dfc61ce4ed4640b9c7903ab982753cba040 (patch) | |
tree | 1fbcdd375ad4cfc50ccf02d15e1ef2fe77bcdfca /libexec | |
parent | 97ee38eb52cd5753cebce85f88b78acd1d4bc716 (diff) |
Pass native path in qt-internal-configure-tests
In the previous patch, I did not account for how we usually use the
qt-internal-configure-test.bat in our CI. This should be a more robust
script, where we search for the source path, -S <PATH>, make it native,
and put it back.
Amend 389b3a131a03b819f2dd01c53222d185170e1924
Pick-to: 6.5
Change-Id: Ic59de2eb1e6720de150a9e15a4b38fae4d871815
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/qt-internal-configure-tests.bat.in | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/libexec/qt-internal-configure-tests.bat.in b/libexec/qt-internal-configure-tests.bat.in index 9dfae90ee7..6b69910c66 100644 --- a/libexec/qt-internal-configure-tests.bat.in +++ b/libexec/qt-internal-configure-tests.bat.in @@ -3,12 +3,25 @@ setlocal ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS set script_dir_path=%~dp0 set script_dir_path=%script_dir_path:~0,-1% -rem add the drive letter to the source_dir_path, -rem by removing the path argument, expanding it, and adding it back -set source_dir_path=%~dpnx1 +rem Extracts the source path, make it native, and put it +rem back again. This is a workaround on Windows LLVM/MINGW +rem to help CMake find source files when doing Unity Build. set args=%* -set args=%args:* =% -set args=%source_dir_path% %args% +set source_dir_path= +set native_source_dir_path= +for %%i in (%args%) do ( + if "%%i"=="-S" ( + set found=true + ) else if defined found ( + set source_dir_path=%%i + set native_source_dir_path=%%~dpnxi + set found= + ) +) + +if NOT "%native_source_dir_path%" == "" ( + set args=!args:%source_dir_path%=%native_source_dir_path%! +) set cmake_scripts_dir=%script_dir_path% |