summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2021-01-13 16:17:17 +0100
committerAlexey Edelev <alexey.edelev@qt.io>2021-01-13 18:00:06 +0100
commit7582f7b03d52103c5299812aed8705d21d4f8b9b (patch)
treebe5974eb2190bddb277bd9be43ffe137d0172548 /cmake
parentb3b28faf2627aad3a0c47fb4c7c711e0d19984aa (diff)
Fix warning in generated test wrappers
Since test command variable may contain quotes, there is a warning in generated test wrappers related to 'message(FATAL_ERROR', that should display full command in log in case of error. To avoid any complicated quoting of command to only display it, join command into single string in wrapper script and pass resulting variable to 'message(FATAL_ERROR'. Pick-to: 6.0 Change-Id: Ie990fc0b0bf2c19b119c7c4e2aeec092e5200103 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtTestHelpers.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmake/QtTestHelpers.cmake b/cmake/QtTestHelpers.cmake
index e1da4a5340..941271df85 100644
--- a/cmake/QtTestHelpers.cmake
+++ b/cmake/QtTestHelpers.cmake
@@ -563,7 +563,8 @@ execute_process(COMMAND ${extra_runner} ${arg_COMMAND}
)
${post_run}
if(NOT result EQUAL 0)
- message(FATAL_ERROR \"${arg_COMMAND} execution failed.\")
+ string(JOIN \" \" full_command ${arg_COMMAND})
+ message(FATAL_ERROR \"\${full_command} execution failed.\")
endif()"
)
endfunction()