[CMake] Getting a list of the defined CMake cache variables along with properties and documentation?
Alexander Neundorf
a.neundorf-work at gmx.net
Thu Dec 4 15:29:43 EST 2008
On Thursday 04 December 2008, Bartlett, Roscoe A wrote:
> Hello,
>
> Is there a way in a CMakeLists.txt file to get a list of all of the defined
> CMake cache variables, get their properties, and their documentation? I
> would like to have this so that I can build more general documentation for
> our CMake project. I could of course just parse the CMakeCache.txt file
> myself but if there is a way to do this in CMake then that might be better.
> Otherwise, I will need to create a tool that would do a configure, then
> read the CMakeCache.txt file and build documentation output like you would
> see for our current autotools build system.
If you want documentation for your custom cmake modules, this is possible.
You can run cmake with the --help-custom-modules argument and it will generate
the documentation for your custom cmake modules. You just have to tell cmake
where they are:
$ cmake -DCMAKE_MODULE_PATH=/opt/kdelibs/share/apps/cmake/modules\
--help-custom-modules
Alex
More information about the CMake
mailing list