diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2018-02-22 12:54:28 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2018-02-22 15:20:24 +0000 |
commit | 8ba501a462058202f913b742f35e2d858e6c11e7 (patch) | |
tree | 7589a31146e8faad492c217cd3d9a4e91c8db786 /share | |
parent | b2ac794e82c3487411eca68a30b7295ed5315dd6 (diff) |
NativeBinary: Do not evaluate qbs properties unnecessarily
... when setting the "aggregate" property. This property is evaluated
internally very early in the product setup process, and thus its RHS
should be as unintrusive as possible.
Change-Id: Iba8313566aac37dcff028e8fb313c6dfe7a0b777
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'share')
-rw-r--r-- | share/qbs/imports/qbs/base/NativeBinary.qbs | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/share/qbs/imports/qbs/base/NativeBinary.qbs b/share/qbs/imports/qbs/base/NativeBinary.qbs index 8a88bd943..0a772b60c 100644 --- a/share/qbs/imports/qbs/base/NativeBinary.qbs +++ b/share/qbs/imports/qbs/base/NativeBinary.qbs @@ -39,11 +39,19 @@ Product { aggregate: { if (!isForDarwin) return false; - var archs = qbs.architectures; - if (archs && archs.length > 1) - return true; - var variants = qbs.buildVariants; - return variants && variants.length > 1; + var multiplexProps = multiplexByQbsProperties; + if (!multiplexProps) + return false; + if (multiplexProps.contains("architectures")) { + var archs = qbs.architectures; + if (archs && archs.length > 1) + return true; + } + if (multiplexProps.contains("buildVariants")) { + var variants = qbs.buildVariants; + return variants && variants.length > 1; + } + return false; } multiplexByQbsProperties: { |