add_test: Optionally use a launcher for tests running in-project targets

Add a `CMAKE_TEST_LAUNCHER` variable and corresponding `TEST_LAUNCHER`
target property.

Issue: #23672
This commit is contained in:
Ralf Habacker
2023-11-11 17:33:39 +01:00
committed by Brad King
parent 478a5f4e04
commit 1ec0372ed4
23 changed files with 233 additions and 7 deletions

View File

@@ -0,0 +1,16 @@
CMAKE_TEST_LAUNCHER
-------------------
.. versionadded:: 3.29
This variable is used to specify a launcher for running tests, added
by the :command:`add_test` command, that run an executable target.
If this variable contains a :ref:`semicolon-separated list <CMake Language
Lists>`, then the first value is the command and remaining values are its
arguments.
This variable can be initialized via an
:envvar:`CMAKE_TEST_LAUNCHER` environment variable.
It is also used as the default value for the
:prop_tgt:`TEST_LAUNCHER` target property of executables.