diff options
author | Adam Strzelecki <ono@java.pl> | 2014-06-12 20:18:32 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-06-13 12:36:43 (GMT) |
commit | de7c2882ff053ebdb60c57caa4f0cef87161fede (patch) | |
tree | c9cbe14bf60b1507d04042fc892625cd3f0aaa89 /Source/cmakemain.cxx | |
parent | 1f00d738bde27a55531d27ba311d977fb9c59539 (diff) | |
download | CMake-de7c2882ff053ebdb60c57caa4f0cef87161fede.zip CMake-de7c2882ff053ebdb60c57caa4f0cef87161fede.tar.gz CMake-de7c2882ff053ebdb60c57caa4f0cef87161fede.tar.bz2 |
cmake,ccmake: Produce shorter output on no arguments (#14973)
Instead printing complete help cmake/ccmake now prints only Usage section and
extra information how to get more help or start your build.
Implementation Details:
Usage help type was renamed to Help, and new Usage was introduces that prints
only command line usage information without any extra details.
Commands add some extra information when no arguments are passed.
Diffstat (limited to 'Source/cmakemain.cxx')
-rw-r--r-- | Source/cmakemain.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index 9f9f6bb..085f263 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -42,6 +42,18 @@ static const char * cmDocumentationUsage[][2] = {0, " cmake [options] <path-to-source>\n" " cmake [options] <path-to-existing-build>"}, + {0, + "Specify a source directory to (re-)generate a build system for " + "it in the current working directory. Specify an existing build " + "directory to re-generate its build system."}, + {0,0} +}; + +//---------------------------------------------------------------------------- +static const char * cmDocumentationUsageNote[][2] = +{ + {0, + "Run 'cmake --help' for more information."}, {0,0} }; @@ -223,6 +235,10 @@ int do_cmake(int ac, char const* const* av) doc.SetName("cmake"); doc.SetSection("Name",cmDocumentationName); doc.SetSection("Usage",cmDocumentationUsage); + if ( ac == 1 ) + { + doc.AppendSection("Usage",cmDocumentationUsageNote); + } doc.AppendSection("Generators",generators); doc.PrependSection("Options",cmDocumentationOptions); |