[Qt-creator] Refactoring the CMake plugin

Hunger Tobias Tobias.Hunger at digia.com
Wed Jun 18 15:31:43 CEST 2014


Hi Benjamin,

On 18.06.2014 15:12, Benjamin Zeller wrote:
<snip out part about CMakeManager and CMakeTool>

>> Why do you need all that? Why doesn't a simple path to the executable
>> suffice? That executable may very well be a script if that is necessary.
> Well the idea here was to be able to , for example, set different
> environment
> variables or add cmake arguments on the fly if the specific cmake
> version needs that.

We need to have a way for the kit to extend the environment anyway, so 
the environment variables should be covered by that functionality (to be 
written;-).

CMake arguments, etc. can all be added in a script. I do not see why 
that has to go into Qt Creator, especially considering that this is 
static configuration that the user will rarely want to change.

> I also heard from other people it would be nice if one could configure a
> cmake installation for example to add a preload cache script.

Yes, we should be flexible and allow users to do whatever they want, but 
we do not need to provide an UI for everything anybody may conceivably 
come up with.

This is one of those things IMHO.

> Also for example if you want to configure a special toolchain file, or
> just for
> identifying a special type of cmake in the sourcecode.

There are different kinds of cmake? That is new to me. I always grabbed 
the one from kitware.

> For example the
> ubuntu sdk plugin identifies Ubuntu SDK kits by checking if the cmake
> tool is of a special type.

Why would you do that?

Desktop ubuntu (is that even supported?) is a pretty normal desktop 
target, so why have a special type for that in the first place? And why 
bind that type to cmake? Why do you want to limit users to the cmake 
build system?

For the phones and other stuff you have to have devices to talk to those 
anyway, so why not use the type of device as a identification? You will 
need to do different deployment steps based on which device you have anyway.

<snip part about mapping CMakeTools to Kits>

>> I would personally just add a CMakeKitInformation with the path to the
>> cmake binary you need to call. No CMakeManager, no CMakeTool, nothing:-)
> Hm interesting, so we need at least a "default" cmake but that can still be
> the one found in PATH, or specified in the cmake settings dialog.

Why do you need a default cmake? Just use the one from PATH if the user 
has none explicitly set (and there is one in PATH).

In the cmake wizard you then need to have the user select a kit (one 
with a configured cmake) and off she goes.

I have nothing further to contribute to the discussion about when to run 
cmake, so I will just cut out that part.

Best Regards,
Tobias




More information about the Qt-creator mailing list