CMake/Help/release/dev/ninja-directory-targets.rst
Brad King 0278989405 Ninja: Add $subdir/{test,install,package} targets
With the Makefile generator one can use `cd $subdir; make install` to build and
install targets associated with a given subdirectory.  This is not possible to
do with the Ninja generator since there is only one `build.ninja` file at the
top of the build tree.  However, we can approximate it by allowing one to run
`ninja $subdir/install` at the top of the tree to build the targets in the
corresponding subdirectory and install them.

This also makes sense for `test`, `package`, and other GLOBAL_TARGET targets.
It was already done for `all` by commit v3.6.0-rc1~240^2~2 (Ninja: Add
`$subdir/all` targets, 2016-03-11).
2016-08-09 15:15:24 -04:00

9 lines
348 B
ReStructuredText

ninja-directory-targets
-----------------------
* The :generator:`Ninja` generator learned to produce phony targets
of the form ``sub/dir/{test,install,package}`` to drive the build
of a subdirectory installation, test or packaging target.
This is equivalent to ``cd sub/dir; make {test,install,package}``
with :ref:`Makefile Generators`.