[Qbs] Suggested way to add non-default build variants
Christian Kandeler
christian.kandeler at qt.io
Fri Jan 13 13:18:06 CET 2017
On 01/11/2017 09:18 AM, Epting, Thomas wrote:
> What is the suggest way to add non-default build variants in Qbs?
>
> Example: In addition to debug and release, we want to support a build variant releaseWithDebugInfo.
>
> The documentation (language-introduction.html) states "By default, "debug" and "release" are valid values but the user can add more in a project file.", but there is no information how this can actually be done.
I don't think this is actually true. In particular, if have no idea what
"add more in a project file" means.
The buildVariant property is used for two things:
1) A number of other properties derive their default values from it,
e.g. cpp.optimization. These can of course be overwritten, so in effect
you have a custom build variant then.
2) There are several places where we assume one of "debug" and
"release", for instance when deciding which variant of the Qt libraries
to link against. Therefore, I think you need to go with one of the two
predefined values.
Christian
More information about the Qbs
mailing list