Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CMake command line option documentation

I'm learning CMake, reading the "Mastering CMake" book and other online available stuff. I wonder is there a detailed documentation for some command line options, for example -H and -B which are used by generated files. Or the "-E echo" has additional options for coloring etc. I was not able to find some documentation for this yet.

UPDATE: right now I saw this for CMake version 3.14.4:

$ cmake --help
  ...
  cmake [options] -S <path-to-source> -B <path-to-build>
  ...
  -S <path-to-source>          = Explicitly specify a source directory.
  -B <path-to-build>           = Explicitly specify a build directory.
  ...

Is this the official version of -H and -B?

like image 225
Andi Avatar asked Feb 13 '11 13:02

Andi


1 Answers

Definitely not. You do have to look at the source code of CMake.

The online docs are good, but there are some private-ish implementation details that we intentionally leave out of the official docs. Command-line stuff we use from generated projects and makefiles are some of those details.

Online docs here:

  • http://cmake.org/cmake/help/v2.8.8/cmake.html

Documented command line options here:

  • http://cmake.org/cmake/help/v2.8.8/cmake.html#section_Options

Overview page, pointing to other sources of information:

  • http://cmake.org/cmake/help/documentation.html
like image 145
DLRdave Avatar answered Sep 17 '22 15:09

DLRdave