MantisBT - CMake
View Issue Details
0014973CMakeCMakepublic2014-06-12 14:572015-01-05 08:38
Adam Strzelecki 
Brad King 
normalfeatureN/A
closedfixed 
AppleOSX10.9.3
 
CMake 3.1CMake 3.1 
0014973: [RFE] Produce shorted output for cmake/ccmake when no arguments specified
Please find attached patch.

Currently running cmake/ccmake without arguments is equal running it with --help which is bad idea since it doesn't really tell what to do.
Instead of that attached patch makes them emit shorter brief with hint:

====
$ cmake/bin/cmake
Usage

  cmake [options] <path-to-source>
  cmake [options] <path-to-existing-build>

Hint

  cmake . for in-source build (not recommended)
  cmake .. for out-of-source build inside subfolder
  cmake --help for more information

Note: Building in separate folder leaves source files intact.
===
No tags attached.
patch 0001-Produce-shorter-output-on-no-arguments.patch (5,752) 2014-06-12 14:57
https://public.kitware.com/Bug/file/5164/0001-Produce-shorter-output-on-no-arguments.patch
patch 0001-Produce-shorter-output-on-no-arguments-2.patch (6,561) 2014-06-12 16:25
https://public.kitware.com/Bug/file/5165/0001-Produce-shorter-output-on-no-arguments-2.patch
Issue History
2014-06-12 14:57Adam StrzeleckiNew Issue
2014-06-12 14:57Adam StrzeleckiFile Added: 0001-Produce-shorter-output-on-no-arguments.patch
2014-06-12 15:31Brad KingNote Added: 0036175
2014-06-12 15:41Brad KingNote Added: 0036177
2014-06-12 16:25Adam StrzeleckiFile Added: 0001-Produce-shorter-output-on-no-arguments-2.patch
2014-06-12 16:26Adam StrzeleckiNote Added: 0036179
2014-06-13 08:34Adam StrzeleckiNote Added: 0036184
2014-06-13 08:41Brad KingNote Added: 0036185
2014-06-13 08:42Brad KingNote Added: 0036186
2014-06-13 08:43Brad KingAssigned To => Brad King
2014-06-13 08:43Brad KingStatusnew => resolved
2014-06-13 08:43Brad KingResolutionopen => fixed
2014-06-13 08:43Brad KingFixed in Version => CMake 3.1
2014-06-13 08:43Brad KingTarget Version => CMake 3.1
2015-01-05 08:38Robert MaynardNote Added: 0037565
2015-01-05 08:38Robert MaynardStatusresolved => closed

Notes
(0036175)
Brad King   
2014-06-12 15:31   
For reference the mailing list thread leading to this patch is:

 Why simple `cmake` does not launch default generator on current directory?
 http://thread.gmane.org/gmane.comp.programming.tools.cmake.user/49711 [^]
(0036177)
Brad King   
2014-06-12 15:41   
I like the general idea of keeping the output to one terminal screen size.

I'd prefer not to give hints like "cmake ." because we do not know anything about the current working directory when the user reads this message. How about simply:

Usage

  cmake [options] <path-to-source>
  cmake [options] <path-to-existing-build>

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.

Run 'cmake --help' for more information.


?
(0036179)
Adam Strzelecki   
2014-06-12 16:26   
0001-Produce-shorter-output-on-no-arguments-2.patch now provides suggested above implementation.

NOTE: This is Git generated patch, so `git am` is preferred to keep commit information.
(0036184)
Adam Strzelecki   
2014-06-13 08:34   
Please find pull request for your convenience here: https://github.com/Kitware/CMake/pull/110 [^]
(0036185)
Brad King   
2014-06-13 08:41   
I've applied the patch here:

 cmake,ccmake: Produce shorter output on no arguments
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=de7c2882 [^]

with a minor tweak to make the advice paragraph show up in the --help output too.
(0036186)
Brad King   
2014-06-13 08:42   
If you'd like to contribute patches regularly please read CONTRIBUTING.rst.
(0037565)
Robert Maynard   
2015-01-05 08:38   
Closing resolved issues that have not been updated in more than 4 months.