diff options
author | Charles Huet <charles.huet@gmail.com> | 2016-03-11 15:26:29 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-03-18 14:59:01 (GMT) |
commit | ca575fe9355a2be2b9fadcc84b05bcfa095c5e64 (patch) | |
tree | 77457921fa1646f190a7b2012a850e7f7a37a7e1 /Source/cmGlobalNinjaGenerator.h | |
parent | 9cdb37e9175b2e3c6367bc4863fda0404cb1c3a2 (diff) | |
download | CMake-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 'Source/cmGlobalNinjaGenerator.h')
-rw-r--r-- | Source/cmGlobalNinjaGenerator.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 8656590..3023a95 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -228,6 +228,8 @@ public: return this->RulesFileStream; } std::string ConvertToNinjaPath(const std::string& path); + std::string ConvertToNinjaFolderRule(const std::string& path); + struct MapToNinjaPathImpl { cmGlobalNinjaGenerator* GG; @@ -342,6 +344,7 @@ private: void WriteAssumedSourceDependencies(); void WriteTargetAliases(std::ostream& os); + void WriteFolderTargets(std::ostream& os); void WriteUnknownExplicitDependencies(std::ostream& os); void WriteBuiltinTargets(std::ostream& os); |