summaryrefslogtreecommitdiff
path: root/cmake/QtBuild.cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2022-08-15 14:12:08 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2022-08-17 21:21:57 +0200
commitedb88a3b2914bcce4a0a99b17ef14e3d4db0a220 (patch)
tree29a24e863a3cdb6d6467da16bd607eb37a1d02ad /cmake/QtBuild.cmake
parent5145d3899d338fbb82a2d314c58eb60a4a5205f8 (diff)
downloadqtbase-edb88a3b2914bcce4a0a99b17ef14e3d4db0a220.tar.gz
CMake: Move _qt_internal_create_command_script to a public file
It's needed for creating qmake build tests. CMake / CTest has a limitation of not allowing to create single-config tests when using a multi-config generator using the add_test(NAME) signature. Using add_test(NAME) forcefully creates per-config tests, which means that it's not possible to just run ctest to execute tests, without specifying a -C parameter, which we do in the CI. qmake tests need to use the add_test(NAME) signature to specify the WORKING_DIRECTORY option. Because of the above limitation, a work around is to not use the add_test(NAME) signature, but instead delegate the working directory assignment to a generated cmake script, which _qt_internal_create_command_script can already do. Pick-to: 6.4 Task-number: QTBUG-96058 Change-Id: I6f439165994671724157f0edb7a71e351271e329 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Diffstat (limited to 'cmake/QtBuild.cmake')
-rw-r--r--cmake/QtBuild.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index 40c7080584..4c3654ba50 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
@@ -557,6 +557,7 @@ include(QtPublicTargetHelpers)
include(QtPublicWalkLibsHelpers)
include(QtPublicFindPackageHelpers)
include(QtPublicDependencyHelpers)
+include(QtPublicTestHelpers)
include(QtPublicToolHelpers)
if(CMAKE_CROSSCOMPILING)