diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2018-10-24 12:22:48 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2018-10-31 12:09:03 +0000 |
commit | 38c897a0d45af8817df2756bc8f7e4489f21cf86 (patch) | |
tree | ddd9e602169f02b8d40fe74dd75225cf23248119 | |
parent | 41e1a4bd2b667c7e5c54553e2b189b2beb38ef49 (diff) |
qbs module: Do not set default values for multiplexing properties
We cannot know whether these values are what the user wants, or even
whether they will work in a given environment. This violates the
principle that modules should only pre-populate list properties if they
are known to be correct under all sane circumstances.
Change-Id: I81ba53fdb619639324a0f54d289d1183c909c4cb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r-- | share/qbs/modules/qbs/common.qbs | 23 | ||||
-rw-r--r-- | tests/auto/blackbox/testdata-apple/apple-multiconfig/apple-multiconfig.qbs | 1 |
2 files changed, 3 insertions, 21 deletions
diff --git a/share/qbs/modules/qbs/common.qbs b/share/qbs/modules/qbs/common.qbs index f53a30e60..8e6fe983e 100644 --- a/share/qbs/modules/qbs/common.qbs +++ b/share/qbs/modules/qbs/common.qbs @@ -196,27 +196,8 @@ Module { // Properties that can be set for multiplexing products. property stringList profiles - property stringList architectures: { - if (targetOS.contains("android")) - return ["armv7a"]; // default should be armv5te for NDK < r16, but we can't check here - if (targetOS.contains("ios-simulator")) - return ["x86", "x86_64"]; - if (targetOS.contains("ios")) - return ["armv7a", "arm64"]; - if (targetOS.contains("macos")) - return ["x86_64"]; - if (targetOS.contains("tvos-simulator")) - return ["x86_64"]; - if (targetOS.contains("tvos")) - return ["arm64"]; - if (targetOS.contains("watchos-simulator")) - return ["x86"]; - if (targetOS.contains("watchos")) - return ["armv7k"]; - return architecture ? [architecture] : undefined; - } - - property stringList buildVariants: [buildVariant] + property stringList architectures + property stringList buildVariants // internal properties readonly property string version: [versionMajor, versionMinor, versionPatch].join(".") diff --git a/tests/auto/blackbox/testdata-apple/apple-multiconfig/apple-multiconfig.qbs b/tests/auto/blackbox/testdata-apple/apple-multiconfig/apple-multiconfig.qbs index 6dca8ffd3..438624f70 100644 --- a/tests/auto/blackbox/testdata-apple/apple-multiconfig/apple-multiconfig.qbs +++ b/tests/auto/blackbox/testdata-apple/apple-multiconfig/apple-multiconfig.qbs @@ -81,6 +81,7 @@ Project { qbs.architecture: "x86_64" multiplexByQbsProperties: project.enableX86 ? ["architectures", "buildVariants"] : ["buildVariants"] + qbs.buildVariants: "debug" install: true installDir: "" |