summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 7ccd76a..ac0f5d0 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -816,6 +816,7 @@ void cmake::SetArgs(const std::vector<std::string>& args,
if(i >= args.size())
{
cmSystemTools::Error("No generator specified for -G");
+ this->PrintGeneratorList();
return;
}
value = args[i];
@@ -826,6 +827,7 @@ void cmake::SetArgs(const std::vector<std::string>& args,
{
cmSystemTools::Error("Could not create named generator ",
value.c_str());
+ this->PrintGeneratorList();
}
else
{
@@ -1993,6 +1995,18 @@ void cmake::GetGeneratorDocumentation(std::vector<cmDocumentationEntry>& v)
}
}
+void cmake::PrintGeneratorList()
+{
+#ifdef CMAKE_BUILD_WITH_CMAKE
+ cmDocumentation doc;
+ std::vector<cmDocumentationEntry> generators;
+ this->GetGeneratorDocumentation(generators);
+ doc.AppendSection("Generators",generators);
+ std::cerr << "\n";
+ doc.PrintDocumentation(cmDocumentation::ListGenerators, std::cerr);
+#endif
+}
+
void cmake::UpdateConversionPathTable()
{
// Update the path conversion table with any specified file:
@@ -2458,6 +2472,7 @@ int cmake::GetSystemInformation(std::vector<std::string>& args)
if(i >= args.size())
{
cmSystemTools::Error("No generator specified for -G");
+ this->PrintGeneratorList();
return -1;
}
value = args[i];
@@ -2468,6 +2483,7 @@ int cmake::GetSystemInformation(std::vector<std::string>& args)
{
cmSystemTools::Error("Could not create named generator ",
value.c_str());
+ this->PrintGeneratorList();
}
else
{