[CMake] Add --help-option command line option.

Nicolas Desprès nicolas.despres at gmail.com
Fri Apr 20 04:44:32 EDT 2012


Hi,

I would like to have your opinion before to start to implement it.

I would like to add the following options to the cmake command line interface:
--help-option opt [file]   = Print help for a given option and exit.
--help-option-list [file]  = List available options and exit.
--help-options [file]      = Print help for all options and exit.

The goal is to have access to the project build options from the
command line interface like you can see them in ccmake and cmake-gui.
Advanced variable will be marked as such, of course. The output will
be similar to --help-variable* options.

I have noticed that most cmake based projects document their options
in their README file whereas the documentation is already included in
cmake when you call the option() and set() commands. I hope this
feature will help to remove this duplication and people will just
write in their README file a "see cmake --help-options for available
build options".

Comments?

-- 
Nicolas Desprès


More information about the CMake mailing list