[CMake] Forwarding parameters to cmake through cmake-gui
David Cole
dlrdave at aol.com
Sat Nov 2 07:58:12 EDT 2013
> -----Original Message-----
> From: physhh . <physhh at gmail.com>
> To: Matthew Woehlke <matthew.woehlke at kitware.com>
> Cc: CMake ML <cmake at cmake.org>
> Sent: Fri, Nov 1, 2013 8:19 pm
> Subject: Re: [CMake] Forwarding parameters to cmake through cmake-gui
>
> The question is: What is the expected behavior?
>
> Execute it per configure but don't overwrite variables? What if one
really wants to overwrite?
>
> Execute it once every time the binary directory changes? Changing
stuff only through setting the path is bad.
>
> Other possiblities?
ccmake and cmake-gui are interactive programs meant to prompt the user
to fill in the cache values properly before typing 'c' or clicking
'Configure'.
-D is a convenient way to give cache values an initial value that is
different from their natural 'default' values.
Using -D with ccmake and cmake-gui makes total sense, but it should
only be used by the program to set the initial value that users see in
the UI. After that point, the user should be in charge, and if he sets
something different in the UI, the user value should win.
I think Matthew's bug report is correct: the UI value should be used
and then stored in the cache for subsequent runs. The -D values to
ccmake and cmake-gui should only be used for initializing UI entries.
Therefore, they should *NOT* be passed to the internal CMake instance
used for configuring.
HTH,
David
More information about the CMake
mailing list