[Qbs] Using Parameter
Christian Kandeler
christian.kandeler at qt.io
Tue Dec 1 11:04:30 CET 2020
On 12/1/20 8:48 AM, Björn Schäpers wrote:
> I've tried to create a product which sets compiler warnings (because
> cpp.warningLevel: "all" is not enough), and I want to be able to opt
> in some more warnings. I found "Parameter" but I have no idea how to
> use it.
I don't think this is what parameters are for. You should just declare
option1 and option2 as normal properties in the Export item and set them
in the product:
>
> Export {
> Depends { name: "cpp" }
property bool option1: ...
property bool option2: ...
> Depends { name: "All Warnings"; option1: true }
Depends { name: "All Warnings"; id: all_warnings }
all_warnings.option1: true
(As you can see, for syntactical reasons such products should preferably
get names that are valid identifiers.)
Christian
More information about the Qbs
mailing list