summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx21
-rw-r--r--Source/cmGlobalNinjaGenerator.h1
2 files changed, 22 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());
+}
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index 32edfaa..e652972 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -274,6 +274,7 @@ private:
void WriteTargetAll(std::ostream& os);
void WriteTargetRebuildManifest(std::ostream& os);
void WriteTargetClean(std::ostream& os);
+ void WriteTargetHelp(std::ostream& os);
/// Called when we have seen the given custom command. Returns true
/// if we has seen it before.