Common CMake command line options, some supported ones under-documented
As far as I can tell, the ccmake
curses-based tool supports the same set of command-line options as the cmake
command. They both appear to go through the cmake::SetArgs()
code path for argument processing. The docs for cmake(1)
are more or less complete, but the docs for ccmake(1)
are missing a lot. It would seem appropriate to factor out the help docs to a separate .rst
file and then have the docs for both commands pull that file in. I don't know how this is typically done with reStructuredText/Sphinx though.
The CMake GUI seems to have separate command-line argument processing, so it doesn't support the same set of options. I don't know if there's a reason for that, but if it can be done, it would seem beneficial to make it support the same options too. There may be some that don't make sense for the GUI though, so maybe it can't be a fully common set of options across all three tools. I suspect many would be (or could be made) common though.
The context for this is that I'm finding that docs often cross-reference cmake(1)
for command-line options that ccmake
also supports, but doesn't document as being supported. I tried to figure out how to add anchors to specific options so they could be more specific links rather than just to the whole cmake(1)
page, but I could only do that by falling back to a :ref:...
link and that didn't format as nicely as :manual:...
links. If we factor out the common options to a separate file, the cross-referencing would also no longer work due to duplicated anchors. With that in mind, an alternative might be to put the common set of command line options in their own dedicated page and cross-reference them from cmake(1)
, ccmake(1)
and cmake-gui(1)
. Not sure if that would make those pages less user-friendly though.