Help: Polish discover_tests with build dependencies

Add a release note and version information pertaining to commit
463517fddd (ctest: Support Test Dependencies for discover_test modules,
2026-08-18).
This commit is contained in:
Tyler Yankee committed 2026-10-05 11:59:45 -04:00
1 parent b6bb95a8bf
commit 68d889a299
3 files changed
+19 -7

No files matched your search

+2
View File
@@ -96,6 +96,8 @@ the provided regular expression and replacement strings.
determines the behavior when the :ctest-option:`--repeat` option is used.
``BUILD_DEPENDS``
.. versionadded:: 4.5
Specify a list of targets or files that must be built before the test
discovery can run.
@@ -0,0 +1,8 @@
discover-tests-build-depends
----------------------------
* The :command:`discover_tests` command gained a ``BUILD_DEPENDS`` argument to
support the :ctest-option:`--out-of-date` behavior of :manual:`ctest(1)`.
* The :prop_dir:`CMAKE_TEST_BUILD_DEPENDS` directory property was added to
support directory-scoped build time dependencies for tests.
+9 -7
View File
@@ -3,23 +3,25 @@ CMAKE_TEST_BUILD_DEPENDS
.. versionadded:: 4.4
.. versionchanged:: 4.5
:generator:`FASTBuild` and the :ref:`Makefile Generators` gained support
for ``test_prep/<name>`` targets.
Enable ``test_prep/<name>`` build targets for tests added by
:command:`add_test` when using the :ref:`Ninja Generators`,
:generator:`FASTBuild`, or :ref:`Makefile Generators`.
.. versionadded:: 4.5
:generator:`FASTBuild` and the :ref:`Makefile Generators` gained support
for ``test_prep/<name>`` targets.
When this variable is set to a true value, CMake generates a
``test_prep/<name>`` target for each eligible test and a ``test_prep/all``
target for all such tests. Building these targets ensures the test executable,
targets referenced by test command generator expressions, and explicit
``BUILD_DEPENDS`` entries are up-to-date before the test runs.
Modules may also extend ``test_prep/all`` with directory-scoped dependencies
via the :prop_dir:`CMAKE_TEST_BUILD_DEPENDS` directory property.
.. versionadded:: 4.5
Modules may also extend ``test_prep/all`` with directory-scoped dependencies
via the :prop_dir:`CMAKE_TEST_BUILD_DEPENDS` directory property.
Tests whose names are not valid target names are excluded from this behavior.
If multiple tests in different directories share the same name, their