diff options
author | Brad King <brad.king@kitware.com> | 2003-04-03 03:44:42 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2003-04-03 03:44:42 (GMT) |
commit | 3bba5f587e719bed322e2d9aeca57283907b7ef9 (patch) | |
tree | 0a8360b95b09b91d912f082b22b72eec7b9f47a3 /Source/cmDocumentation.cxx | |
parent | 5ebcb51fb4b3f4ad6ce6933e3f166d3824cf9154 (diff) | |
download | CMake-3bba5f587e719bed322e2d9aeca57283907b7ef9.zip CMake-3bba5f587e719bed322e2d9aeca57283907b7ef9.tar.gz CMake-3bba5f587e719bed322e2d9aeca57283907b7ef9.tar.bz2 |
ENH: Running with zero arguments now produces usage.
Diffstat (limited to 'Source/cmDocumentation.cxx')
-rw-r--r-- | Source/cmDocumentation.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx index 394c263..121afc7 100644 --- a/Source/cmDocumentation.cxx +++ b/Source/cmDocumentation.cxx @@ -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"; } //---------------------------------------------------------------------------- |