[CMake] Forwarding parameters to cmake through cmake-gui

Matthew Woehlke matthew.woehlke at kitware.com
Fri Nov 1 11:12:32 EDT 2013


On 2013-11-01 10:47, physhh . wrote:
> What I'm looking for:
> If cmake is used directly from the command line, it's possible to pass a
> bunch of options. This is nice because with this it's possible to use
> default settings - even if the cache get deleted.

ccmake accepts e.g. -D options to set CMake cache variables. It... does 
appear that cmake-gui does not. That seems like a bug (or at least a 
missing feature that one would naturally expect to exist).

> I would like to see a feature which makes it possible to pass command line
> options to cmake-gui which get forwarded to cmake when it gets called. To
> make this work the cmake-gui could look for parameters which look like
> "forward-*" (where the * is a cmake option name) and pass it to cmake.

I'm not sure a "forward" option makes sense... what would it mean to 
"forward" e.g. -P or -E?

Rather, I think cmake-gui should just accept directly those options that 
make sense, e.g. -D, -U, -C, -G, -T and probably -W[no-]dev, the same 
way that ccmake does. (Besides, these should affect cmake-gui even 
before cmake is invoked, so merely forwarding them is actually 
insufficient.)

-- 
Matthew



More information about the CMake mailing list