[CMake] Forwarding parameters to cmake through cmake-gui

Matthew Woehlke matthew.woehlke at kitware.com
Mon Nov 4 10:57:44 EST 2013


On 2013-11-02 07:58, David Cole wrote:
> physhh wrote:
>> The question is: What is the expected behavior?
>
> 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.

My thoughts exactly. Thanks, David.

-- 
Matthew



More information about the CMake mailing list