[QBS] Increasing verbosity of targetOS-based on conditions in user code
Joerg Bornemann
joerg.bornemann at digia.com
Thu Jun 13 09:02:52 CEST 2013
On 13/06/2013 05:08, Jake Thomas Petroules wrote:
[...]
> Therefore, I'd like to propose a 'filter' property which could be used
> like so:
>
> Group {
> filter: { "qbs.targetOS": ["windows", "darwin"] }
> files: [ "MicrosoftAppleCode.c" ]
> }
Note that the exact syntax would be
filter: ({"qbs.targetOS": ["windows", "darwin"]})
// extra parenthesis, because that's how the QML parser
// distinguishes between blocks and object literals
or alternatively
filter: { return {"qbs.targetOS": ["windows", "darwin"]}; }
Is it really worth it, given that we want extend Array to have a
contains method anyway, which would make the code less verbose again?
BR,
Joerg
More information about the Qbs
mailing list