Commit d58b93a5 authored by Alexander Neundorf's avatar Alexander Neundorf
Browse files

ENH: separate the commands into current and compat as in cmake

Alex
parent ea874415
...@@ -111,17 +111,24 @@ BOOL CMakeSetup::InitInstance() ...@@ -111,17 +111,24 @@ BOOL CMakeSetup::InitInstance()
{ {
// Construct and print requested documentation. // Construct and print requested documentation.
cmake hcm; cmake hcm;
hcm.AddCMakePaths(cmdInfo.GetArgV()[0]);
doc.SetCMakeRoot(hcm.GetCacheDefinition("CMAKE_ROOT"));
std::vector<cmDocumentationEntry> commands; std::vector<cmDocumentationEntry> commands;
std::vector<cmDocumentationEntry> compatCommands;
std::vector<cmDocumentationEntry> generators; std::vector<cmDocumentationEntry> generators;
hcm.GetCommandDocumentation(commands); hcm.GetCommandDocumentation(commands, true, false);
hcm.GetCommandDocumentation(compatCommands, false, true);
hcm.GetGeneratorDocumentation(generators); hcm.GetGeneratorDocumentation(generators);
doc.SetName("CMakeSetup"); doc.SetName("cmake");
doc.SetNameSection(cmDocumentationName); doc.SetNameSection(cmDocumentationName);
doc.SetUsageSection(cmDocumentationUsage); doc.SetUsageSection(cmDocumentationUsage);
doc.SetDescriptionSection(cmDocumentationDescription); doc.SetDescriptionSection(cmDocumentationDescription);
doc.SetGeneratorsSection(&generators[0]); doc.SetGeneratorsSection(&generators[0]);
doc.SetOptionsSection(cmDocumentationOptions); doc.SetOptionsSection(cmDocumentationOptions);
doc.SetCommandsSection(&commands[0]); doc.SetCommandsSection(&commands[0]);
doc.SetCompatCommandsSection(&compatCommands[0]);
return (doc.PrintRequestedDocumentation(std::cout)? 0:1); return (doc.PrintRequestedDocumentation(std::cout)? 0:1);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment