[CMake] Is there a way to produce the documentation of cmake in xml format?

Nils Gladitz nilsgladitz at gmail.com
Wed Jun 7 16:35:51 EDT 2017


On 07.06.2017 21:23, Martin Weber wrote:
> Hi all,
>
> is there a way to extract the documentation from cmake-sources and convert
> that to XML?
> I am trying to work on CmakeEd [1]. This Eclipse plugin has support for
> editing cmakelists files (syntax highlighting, code completion), but only for
> cmake 2.8 which I want to update.
> If I had docs in XML I could use XSLT to produce my files instead of typing
> all the stuff...
>
> Any ideas?
> 	Martin

CMake uses the Sphinx documentation system:

     http://www.sphinx-doc.org


One of the supported builders is "xml" (Docutils-native XML).


Assuming you've installed sphinx and enabled e.g. SPHINX_HTML 
(-DSPHINX_HTML=ON) you could try a verbose build of the "documentation" 
target to see how a sphinx-build invocation looks like.

To change the builder modify the argument after the -b option (e.g. 
replace "html" with "xml").


Nils



More information about the CMake mailing list