Commit 3bba5f58 authored by Brad King's avatar Brad King
Browse files

ENH: Running with zero arguments now produces usage.

parent 5ebcb51f
......@@ -172,6 +172,13 @@ void cmDocumentation::PrintDocumentation(Type ht, std::ostream& os)
//----------------------------------------------------------------------------
cmDocumentation::Type cmDocumentation::CheckOptions(int argc, char** argv)
{
// Providing zero arguments gives usage information.
if(argc == 1)
{
return cmDocumentation::Usage;
}
// Search for supported help options.
for(int i=1; i < argc; ++i)
{
if((strcmp(argv[i], "-help") == 0) ||
......@@ -402,9 +409,9 @@ void cmDocumentation::PrintSectionUsage(std::ostream& os,
os << "\n";
this->TextIndent = "";
this->PrintFormatted(os, op->brief);
os << "\n";
}
}
os << "\n";
}
//----------------------------------------------------------------------------
......
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