summaryrefslogtreecommitdiff
path: root/tests/auto/blackbox/testdata-apple
diff options
context:
space:
mode:
authorIvan Komissarov <abbapoh@gmail.com>2020-01-12 14:09:29 +0100
committerIvan Komissarov <ABBAPOH@gmail.com>2020-08-07 11:11:28 +0000
commite3fe3e19cb1d06ae9a0a37bc6fdac25d57bdfe4a (patch)
tree0c168437e6bb17f56bffcb9cd0f21313b58ffefd /tests/auto/blackbox/testdata-apple
parentc6400e94e01c8170740c52c916d171072d2c1f2c (diff)
downloadqbs-e3fe3e19cb1d06ae9a0a37bc6fdac25d57bdfe4a.tar.gz
Make TestBlackboxApple::aggregateDependencyLinking smarter
Now it covers old macs, ios and new arm64 macs Task-number: QBS-1456 Change-Id: Icc7d7ca040266a85947c29f3b5d8f191c07cfffe Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'tests/auto/blackbox/testdata-apple')
-rw-r--r--tests/auto/blackbox/testdata-apple/aggregateDependencyLinking/aggregateDependencyLinking.qbs27
1 files changed, 24 insertions, 3 deletions
diff --git a/tests/auto/blackbox/testdata-apple/aggregateDependencyLinking/aggregateDependencyLinking.qbs b/tests/auto/blackbox/testdata-apple/aggregateDependencyLinking/aggregateDependencyLinking.qbs
index a65dcd023..0dc55fde9 100644
--- a/tests/auto/blackbox/testdata-apple/aggregateDependencyLinking/aggregateDependencyLinking.qbs
+++ b/tests/auto/blackbox/testdata-apple/aggregateDependencyLinking/aggregateDependencyLinking.qbs
@@ -9,10 +9,25 @@ Project {
Depends { name: "cpp" }
Depends { name: "bundle" }
+ property bool hasX86Mac: true // cannot use xcode.version in qbs.architectures
+ property bool hasArmMac: false
bundle.isBundle: false
// This will generate 2 multiplex configs and an aggregate.
- qbs.architectures: ["x86", "x86_64"]
+ qbs.architectures: {
+ if (qbs.targetPlatform === "macos") {
+ if (hasX86Mac)
+ return ["x86_64", "x86"];
+ else if (hasArmMac)
+ return ["arm64", "x86_64"];
+ } else if (qbs.targetPlatform === "ios") {
+ return ["arm64", "armv7a"];
+ }
+ console.info("Cannot build fat binaries for this target platform ("
+ + qbs.targetPlatform + ")");
+ return original;
+ }
+
qbs.buildVariant: "debug"
cpp.minimumMacosVersion: "10.8"
}
@@ -22,14 +37,20 @@ Project {
files: ["app.c"]
// This should link only against the aggregate static library, and not against
- // the {debug, x86_64} variant, or worse - against both the single arch variant
+ // the {debug, arm64} variant, or worse - against both the single arch variant
// and the lipo-ed one.
Depends { name: "multi_arch_lib" }
Depends { name: "bundle" }
bundle.isBundle: false
- qbs.architecture: "x86_64"
+ qbs.architecture: {
+ if (qbs.targetPlatform === "macos")
+ return "x86_64";
+ else if (qbs.targetPlatform === "ios")
+ return "arm64";
+ return original;
+ }
qbs.buildVariant: "debug"
cpp.minimumMacosVersion: "10.8"
multiplexByQbsProperties: []