[CMake] [cmake-developers] Forwarding parameters to cmake through cmake-gui

physhh . physhh at gmail.com
Tue Nov 5 15:14:41 EST 2013


On Tue, Nov 5, 2013 at 8:56 PM, Matthew Woehlke <matthew.woehlke at kitware.com
> wrote:

> On 2013-11-05 14:36, Alexander Neundorf wrote:
>
>> I tried the following a few times in the past and noticed everytime that
>> it
>> does not work:
>> $ cd src
>> src/ $ mkdir build
>> src/ $ cd build
>> src/build/ $ cmake-gui -DSOME_VARIABLE=some_value ..
>>
>> I'd like that to work. Would it work with your proposal ?
>>
>
> Yes.
>
>
>  Once the cache is deleted in cmake-gui, I would expect that the values
>> from
>> the command line are also forgotten, also the -U values. Otherwise this
>> cmake
>> would remove the matching entries from every cache I load.
>>
>
> True. (But what if that's what you want?)
>
Could you give me a use case where u actuall don't want this? As already
stated are the command line parameters the "default" values.
If I dont' want to remove an entry by default I won't pass that parameter.
If I want to remove an entry (but not by default) I will do it with the gui
itself - That's what the gui is for?



>
> The biggest problem is, what if you run cmake-gui without specifying a
> build directory? In that case, whatever comes up initially is as likely as
> not *not* the directory you want to apply options to.
>
> What about having an option (e.g. a combo box) when to apply command line
> options?
>
> - At startup (only initial / specified on command line build directory)
> - New projects (when no CMakeCache.txt exists yet, but also at startup)
> - Unconfigured projects (per my original proposal)
> - Always (i.e. when selecting a different build directory)
>
> The default could be 'new projects' if no build directory is specified on
> the command line (probably you are giving "common" rather than project
> specific options in this case), otherwise 'at startup' (more chance options
> are project specific).
>
> --
> Matthew
>
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20131105/353468d2/attachment.htm>


More information about the CMake mailing list