CMake/Help/generator/Ninja.rst
Charles Huet ca575fe935 Ninja: Add $subdir/all targets
With the Makefile generator one can use `cd $subdir; make all` to build
all 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/all` at the top of the tree to build
the targets in the corresponding subdirectory.

Port logic from cmGlobalUnixMakefileGenerator3::WriteDirectoryRule2 to
cmGlobalNinjaGenerator in order to produce equivalent directory-level
targets.
2016-03-18 10:59:01 -04:00

13 lines
385 B
ReStructuredText

Ninja
-----
Generates build.ninja files.
A build.ninja file is generated into the build tree. Recent versions
of the ninja program can build the project through the "all" target.
An "install" target is also provided.
For each subdirectory ``sub/dir`` of the project an additional target
named ``sub/dir/all`` is generated that depends on all targets required
by that subdirectory.