Set QT_COMMAND_LINE_PARSER_NO_GUI_MESSAGE_BOXES before TRY_RUN

Set `QT_COMMAND_LINE_PARSER_NO_GUI_MESSAGE_BOXES` before trying to run
qt tools for correctness. This is to suppress QCommandLinerParser from
showing a message box when console is not available.

Pick-to: 6.5.2 6.5 6.6
Task-number: QTBUG-114530
Change-Id: Ib3d264a799a5da1f620d2bebe55539bafc43da0f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Amir Masoud Abdol 2023-06-19 10:54:37 +02:00
parent cdcead0ab2
commit 45e17162ba

View File

@ -278,7 +278,8 @@ echo. > ${target_bin_dir}/${target}_try_run_passed"
DEPENDS
${target}
COMMAND
cmd /c ${try_run_scripts_path}
${CMAKE_COMMAND} -E env QT_COMMAND_LINE_PARSER_NO_GUI_MESSAGE_BOXES=1
${try_run_scripts_path}
COMMENT
"Testing ${target} by trying to run it."
VERBATIM