When building a project using CMake and Make, you can execute make
from a subdirectory of your build tree (i.e. from a directory below whatever directory contains y
ninja
works with recent versions of Ninja (1.7.2). Version 1.3.4 does not allow this.
I could not find a reference to this on the manual. However, CMake has this documented here:
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, 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.