[QBS] build configuration (apologies for accidental premature post!)

Tobias Hunger tobias.hunger at gmx.de
Sat Oct 20 13:15:09 CEST 2012


On 17.10.2012 11:13, Joerg Bornemann wrote:
> I'd rather (automatically?) define a new buildVariant if a property is 
> altered on command line. Note that this is not possible yet. 
So builds will end up in directories with names partially made up of 
automatically generated names? I do not want build/myproject-debug25
nor build/myproject-af4235de. How am I ever going to know which one of 
those I want to keep around or which ones I can delete?

A simple solution to this issue is to expect the user to create build 
directories with a reasonable name himself. Basically that is a lot
like shadow-building in qmake: You set up a directory 
"build-with-debug-enabled-and-blue-background", cd into it and run qmake 
from
there. I would really like to see something like this being possible.

Build variants are then just what the name applies: Variations of 
"normal" builds that are widely used by almost everybody (like debug,
release, maybe things like profiling and others). Project-specific 
configuration should be possible in qbs, _without_ changing those basic
build settings.

The downside is that the build directory becomes more prominent again, 
which will bring out the same problems we had with qmake:
People treating the build directory as if it was an installed instance 
of their software (wondering why files that need not be build are
not in their places, etc.).

That could be prevented by building in
".../build-with-debug-enabled-and-blue-background/.build" and moving the 
files into
".../build-with-debug-enabled-and-blue-background" only after the build 
is done in some implicit install step which will move all the
files into the right places, incl. files in the source dir that need to 
be installed. That would take the pain out of shadow-building,
of course at the cost of extra copy operations.

Best Regards,
Tobias



More information about the Qbs mailing list