Reputation: 7881
I'd like to be able to supply my end users with help info about the build (such as build flags, ect) within a cmake script. Something like
cmake -G "Visual Studio 2010 Win64" projectpath --help
Configures the Foo project.
Sytnax:
cmake -G "Visual Studio 2010 Win64" projectpath --help [options]
where options are
-DNOTEST=1 disables test code
(ect)
Is there any built in way to do this?
Upvotes: 1
Views: 93
Reputation: 1143
When you define options or cache variables, there is a parameter that specifies the help string. Users see that help string depending on how they're running cmake. In the GUI, options show up after the initial configuration and users can see the help text by hovering over it. From the command line, after running cmake once, the command cmake -LH will display variables with help text. See:
Upvotes: 1