[CMake] Forwarding parameters to cmake through cmake-gui

physhh . physhh at gmail.com
Mon Nov 4 13:43:17 EST 2013


My question is still not answered completely:
When should the new variable be added? On startup is not really possible
because it might be the case that your src/binary directory is not set
properly.
So you would agree that it makes sense to do it "on configure" but only if
the cache is empty? This will not allow to overwrite the variable via
parameter but I guess that usecase is not very common?


On Mon, Nov 4, 2013 at 4:57 PM, Matthew Woehlke <matthew.woehlke at kitware.com
> wrote:

> 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
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20131104/f0972ecd/attachment.htm>


More information about the CMake mailing list