summaryrefslogtreecommitdiffstats
path: root/cmake/QtPublicTestHelpers.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/QtPublicTestHelpers.cmake')
-rw-r--r--cmake/QtPublicTestHelpers.cmake10
1 files changed, 7 insertions, 3 deletions
diff --git a/cmake/QtPublicTestHelpers.cmake b/cmake/QtPublicTestHelpers.cmake
index 70fa45a898..771911c5d5 100644
--- a/cmake/QtPublicTestHelpers.cmake
+++ b/cmake/QtPublicTestHelpers.cmake
@@ -1,5 +1,5 @@
# Copyright (C) 2022 The Qt Company Ltd.
-# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+# SPDX-License-Identifier: BSD-3-Clause
# This function wraps COMMAND with cmake script, that makes possible standalone run with external
# arguments.
@@ -64,7 +64,7 @@ is not specified")
#Escaping environment variables before expand them by file GENERATE
string(REPLACE "\\" "\\\\" environment_extras "${environment_extras}")
- if(WIN32)
+ if(CMAKE_HOST_WIN32)
# 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.
@@ -97,8 +97,12 @@ execute_process(COMMAND ${extra_runner} ${arg_COMMAND}
)
${post_run}
if(NOT result EQUAL 0)
- string(JOIN \" \" full_command ${arg_COMMAND})
+ string(JOIN \" \" full_command ${extra_runner} ${arg_COMMAND})
message(FATAL_ERROR \"\${full_command} execution failed with exit code \${result}.\")
endif()"
)
endfunction()
+
+function(_qt_internal_test_batch_target_name out)
+ set(${out} "test_batch" PARENT_SCOPE)
+endfunction()