mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Extend the test_prep/<test> and test_prep/all build targets, generated from add_test(BUILD_DEPENDS) when CMAKE_TEST_BUILD_DEPENDS is enabled, to the Makefile generators. Previously only the Ninja and FASTBuild generators provided them. Resolve each test's dependencies in a shared layer so all command-line generators consume one result. cmTestGenerator now filters target dependencies to build-system targets and records, for each file dependency, the single target that produces it as a primary custom-command output (cmGlobalGenerator::FindOutputOwningTarget). The Makefile generators emit phony rules in CMakeFiles/Makefile2 depending on <target>.dir/all, with top-level forwarding rules. Sharing the resolution also stops Ninja and FASTBuild from emitting a dead test_prep edge for a non-buildable (e.g. INTERFACE) BUILD_DEPENDS target. On the Makefile generators a file dependency that no single target produces, and a test whose name contains ':', cannot be expressed as a recursive-make rule and are reported with a warning and skipped. Fixes: #27879
10 lines
489 B
ReStructuredText
10 lines
489 B
ReStructuredText
test-prep-makefile-generators
|
|
-----------------------------
|
|
|
|
* The :generator:`FASTBuild` generator and the :ref:`Makefile Generators`
|
|
now generate ``test_prep/<test-name>`` and ``test_prep/all`` convenience
|
|
build targets when the :variable:`CMAKE_TEST_BUILD_DEPENDS` variable is
|
|
enabled, matching the behavior of the :ref:`Ninja Generators`. These
|
|
targets build the dependencies of tests added by :command:`add_test`,
|
|
including those listed with the ``BUILD_DEPENDS`` keyword.
|