diff options
Diffstat (limited to 'Source/CPack/cpack.cxx')
-rw-r--r-- | Source/CPack/cpack.cxx | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index 623cdcd..4e49727 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -21,6 +21,7 @@ #include "cmCPackLog.h" #include "cmDocumentation.h" #include "cmDocumentationEntry.h" +#include "cmDocumentationFormatter.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmStateSnapshot.h" @@ -368,8 +369,21 @@ int main(int argc, char const* const* argv) cpackGenerator->SetTraceExpand(traceExpand); } else { cmCPack_Log(&log, cmCPackLog::LOG_ERROR, - "Cannot initialize CPack generator: " << gen - << std::endl); + "Could not create CPack generator: " << gen + << std::endl); + // Print out all the valid generators + cmDocumentation generatorDocs; + std::vector<cmDocumentationEntry> v; + for (auto const& g : generators.GetGeneratorsList()) { + cmDocumentationEntry e; + e.Name = g.first; + e.Brief = g.second; + v.push_back(std::move(e)); + } + generatorDocs.SetSection("Generators", v); + std::cerr << "\n"; + generatorDocs.PrintDocumentation(cmDocumentation::ListGenerators, + std::cerr); parsed = 0; } |