summaryrefslogtreecommitdiffstats
path: root/Help/generator
diff options
context:
space:
mode:
authorCharles Huet <charles.huet@gmail.com>2016-03-11 15:26:29 (GMT)
committerBrad King <brad.king@kitware.com>2016-03-18 14:59:01 (GMT)
commitca575fe9355a2be2b9fadcc84b05bcfa095c5e64 (patch)
tree77457921fa1646f190a7b2012a850e7f7a37a7e1 /Help/generator
parent9cdb37e9175b2e3c6367bc4863fda0404cb1c3a2 (diff)
downloadCMake-ca575fe9355a2be2b9fadcc84b05bcfa095c5e64.zip
CMake-ca575fe9355a2be2b9fadcc84b05bcfa095c5e64.tar.gz
CMake-ca575fe9355a2be2b9fadcc84b05bcfa095c5e64.tar.bz2
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.
Diffstat (limited to 'Help/generator')
-rw-r--r--Help/generator/Ninja.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/Help/generator/Ninja.rst b/Help/generator/Ninja.rst
index 920abcb..d94e5f6 100644
--- a/Help/generator/Ninja.rst
+++ b/Help/generator/Ninja.rst
@@ -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.