diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2018-06-15 17:44:58 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2018-06-20 08:26:08 +0000 |
commit | 4764e3eb961013e169c155648f26b0e63eb2b574 (patch) | |
tree | a1b761e77188b98eaf8fdba251f18fcc75822696 /tests/auto/blackbox/tst_blackboxapple.cpp | |
parent | 5a8e20fe51e95ac5ab97c4c691a3c194383cff55 (diff) |
Don't link to multiplexed libraries when depending on the aggregate
... library, this can lead to warnings or linker errors. Most easily
seen on macOS when multiplexing across multiple architectures,
and an app ends up linking against multiple multiplexed variants of
a dependent product library.
Change-Id: I4ea4b419099a1010f7b8c32ee11079da93f1d236
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'tests/auto/blackbox/tst_blackboxapple.cpp')
-rw-r--r-- | tests/auto/blackbox/tst_blackboxapple.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/blackbox/tst_blackboxapple.cpp b/tests/auto/blackbox/tst_blackboxapple.cpp index 6fc526cd8..c08cc9759 100644 --- a/tests/auto/blackbox/tst_blackboxapple.cpp +++ b/tests/auto/blackbox/tst_blackboxapple.cpp @@ -145,6 +145,20 @@ void TestBlackboxApple::appleMultiConfig() } } +void TestBlackboxApple::aggregateDependencyLinking() +{ + if (HostOsInfo::hostOsVersion() > qbs::Version(10, 13, 4)) + QSKIP("32-bit arch build is no longer supported on macOS versions higher than 10.13.4."); + + QDir::setCurrent(testDataDir + "/aggregateDependencyLinking"); + QCOMPARE(runQbs(QStringList{"-p", "multi_arch_lib"}), 0); + + QCOMPARE(runQbs(QStringList{"-p", "just_app", "--command-echo-mode", "command-line"}), 0); + int linkedInLibrariesCount = + QString::fromUtf8(m_qbsStdout).count(QStringLiteral("multi_arch_lib.a")); + QCOMPARE(linkedInLibrariesCount, 1); +} + void TestBlackboxApple::assetCatalog() { QFETCH(bool, flatten); |