mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
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.
This commit is contained in:
@@ -6,3 +6,7 @@ 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.
|
||||
|
||||
Reference in New Issue
Block a user