diff options
author | Brad King <brad.king@kitware.com> | 2016-08-05 19:55:32 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-08-09 19:15:24 (GMT) |
commit | 0278989405eea53ca7e5f1bfa6af9aea7a0b49c5 (patch) | |
tree | b51f07947692aa3d95eef9299ee588061be83afc /Help/generator | |
parent | a88c99f1bc301276a1780fec683d5061ca13f66f (diff) | |
download | CMake-0278989405eea53ca7e5f1bfa6af9aea7a0b49c5.zip CMake-0278989405eea53ca7e5f1bfa6af9aea7a0b49c5.tar.gz CMake-0278989405eea53ca7e5f1bfa6af9aea7a0b49c5.tar.bz2 |
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).
Diffstat (limited to 'Help/generator')
-rw-r--r-- | Help/generator/Ninja.rst | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/Help/generator/Ninja.rst b/Help/generator/Ninja.rst index d94e5f6..ef0e28b 100644 --- a/Help/generator/Ninja.rst +++ b/Help/generator/Ninja.rst @@ -7,6 +7,17 @@ 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. +For each subdirectory ``sub/dir`` of the project, additional targets +are generated: + +``sub/dir/all`` + Depends on all targets required by the subdirectory. + +``sub/dir/install`` + Runs the install step in the subdirectory, if any. + +``sub/dir/test`` + Runs the test step in the subdirectory, if any. + +``sub/dir/package`` + Runs the package step in the subdirectory, if any. |