summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorNicolas Despres <nicolas.despres@gmail.com>2012-04-19 15:07:35 (GMT)
committerPeter Kuemmel <syntheticpp@gmx.net>2012-05-09 17:08:12 (GMT)
commit92cee7626c5066a4af4cf66f85b0cd2c06bd9439 (patch)
treeffaffdb99006dfbbd04bb5b53f6cd5201014221e /Source/cmGlobalNinjaGenerator.cxx
parent3bd41f2eb564d891c95e3ead5e72656b7daa3ff1 (diff)
downloadCMake-92cee7626c5066a4af4cf66f85b0cd2c06bd9439.zip
CMake-92cee7626c5066a4af4cf66f85b0cd2c06bd9439.tar.gz
CMake-92cee7626c5066a4af4cf66f85b0cd2c06bd9439.tar.bz2
Ninja: Add a convenient 'help' target.
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index ee3842d..67f809a 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -755,6 +755,7 @@ void cmGlobalNinjaGenerator::WriteBuiltinTargets(std::ostream& os)
this->WriteTargetAll(os);
this->WriteTargetRebuildManifest(os);
this->WriteTargetClean(os);
+ this->WriteTargetHelp(os);
}
void cmGlobalNinjaGenerator::WriteTargetAll(std::ostream& os)
@@ -841,3 +842,23 @@ void cmGlobalNinjaGenerator::WriteTargetClean(std::ostream& os)
/*orderOnlyDeps=*/ cmNinjaDeps(),
/*variables=*/ cmNinjaVars());
}
+
+void cmGlobalNinjaGenerator::WriteTargetHelp(std::ostream& os)
+{
+ WriteRule(*this->RulesFileStream,
+ "HELP",
+ "ninja -t targets",
+ "All primary targets available:",
+ "Rule for printing all primary targets available.",
+ /*depfile=*/ "",
+ /*restat=*/ false,
+ /*generator=*/ false);
+ WriteBuild(os,
+ "Print all primary targets available.",
+ "HELP",
+ /*outputs=*/ cmNinjaDeps(1, "help"),
+ /*explicitDeps=*/ cmNinjaDeps(),
+ /*implicitDeps=*/ cmNinjaDeps(),
+ /*orderOnlyDeps=*/ cmNinjaDeps(),
+ /*variables=*/ cmNinjaVars());
+}