This builtin documentation comes from 2 different places:
static variables in C++ sources
text surrounded by markup in CMake script files
Documentation in C++ sources
This is the primary source of builtin documentation.
Documentation markup in CMake script files
This source is available since CMake 2.8.8 and is currently only used by
CPack. The idea behind CMake script markup is to be able to document
CMake scripts. Documenting a script means being able to put in
structured documentation using some comments.
Before 2.8.8, this was available through:
which was basically extracting the first block of comments stripping out
the comment character ('#').
From 2.8.8 and up we may be able to do more by using a basic markup
language which may be used to document:
The markup may then be automatically extracted by ctool (cmake, cpack,
ctest) in order to feed their
command lines options.
A comment in a CMake script is a line which begin by a '#' character. A
markup line is a special line which begin with a '##' (double '#')
followed by a markup word. The list of currently supported markup words
A documentation block must always begins with a non-end markup line and
finishes with a ##end markup line.
This page was initially populated by conversion from its original location in another wiki.