开发者

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.

Right now I saw this for CMake version 3.14.4:

$ cmake --help
  ...
  cmake [options] -S <path-to-sour开发者_Go百科ce> -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?


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


Cmake documentation has sensibly improved in the meantime, but -H<directory> and -B keep being hidden, probably for good reasons (they shouldn't be used outside of CMake development context).

-H<directory> and -B are both explained here.

For cmake -E, options are documented in this section.


Probably not. You might have to look at the source code of CMake.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜