Configure build directory dialog explained

Andreas Pakulat apaku at gmx.de
Sat Oct 29 19:27:22 BST 2011


On 29.10.11 19:15:03, Mateusz Łoskot wrote:
> On 29 October 2011 11:28, Andreas Pakulat <apaku at gmx.de> wrote:
> > On 29.10.11 01:14:38, Mateusz Łoskot wrote:
> Understood.
> I assume you mean the following procedure:
> 1) Project > Open Configuration > "Configure CMake settings" panel
> 2) Green plus on the right of the combo box with currently configured
> build directory
> 3) Configure a build directory
> 4) Check if CMAKE_BUILD_TYPE is set accordingly
> 
> Then to switch between build types, do step 1) and select build
> directory from the combo.
> 
> I have tried this procedure and it seems to work.
> 
> A few comments came to my mind:
> 1) Build directory combo box in "Configure CMake settings" panel is
> not labelled,
>     so it's may be confusing what is this.
> 2) IMHO, "Configure CMake settings" could be more user-friendly if:
> - has combo box labelled "Build type" what would correspond with
> setting put in new/import project configuration dialog

Note that the builddir is not just about the build-type. Depending on
other parameters passed to cmake or the configured installation
directory 2 builddirs might have the same build type but are still to be
considered different things.

> >> Question 3)
> >> If Debug is selected as Build type and Extra Arguments is given with
> >> -DCMAKE_BUILD_TYPE=Release, which one has preference?
> >
> > Thats something to look up in the cmake manual or the cmake mailinglist.
> 
> IMO, it is KDevelop thing, not CMake.

No its not. The extra arguments is a free-form field thats simply passed
to cmake in addition to what kdevelop passes. Which one is preferred is
cmake's decision and this can potentially change and also be influenced
by environment variables. So kdevelop passing the selected build-type as
last may work today, but maybe not even in all situations let alone in
the future.

So yes, the lineedit allows to shoot yourself in the foot, but thats the
case with all free-form user-input to programs.

Andreas





More information about the KDevelop mailing list