Use the 'call' command when generating the command scripts

cmd.exe has a huge problem when running the batch scripts locating
by paths contaning spaces and more the one set of quotes in arguments.
This can be worked around by using the 'call' command as the test
command runner.

Fixes: QTBUG-132258
Pick-to: 6.5 6.8 6.9
Change-Id: I9b6fb0f8bccf44456e4cb9b79f3c6bd3f9fe4678
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Alexey Edelev 2024-12-24 12:35:39 +01:00
parent be8391e56d
commit 10a3859809

View File

@ -68,7 +68,10 @@ is not specified")
# It's necessary to call actual test inside 'cmd.exe', because 'execute_process' uses
# SW_HIDE to avoid showing a console window, it affects other GUI as well.
# See https://gitlab.kitware.com/cmake/cmake/-/issues/17690 for details.
set(extra_runner "cmd /c")
#
# Run the command using the proxy 'call' command to avoid issues related to invalid
# processing of quotes and spaces in cmd.exe arguments.
set(extra_runner "cmd /c call")
endif()
if(arg_PRE_RUN)