diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2018-02-16 12:33:56 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2018-02-16 12:23:13 +0000 |
commit | 1e142242fc462ebfa5c84339c8f2de2273712ece (patch) | |
tree | 6bbce25abd52ae5f234c61a4264ea7b8d5571991 /tests | |
parent | 2cfcd34138d6f7851b4006dd77dd73e242727512 (diff) |
Autotests: Fix function that figures out the object file extension
It did not know about qbs.toolchainType.
Change-Id: I00bcd5518f81a65fa49153b75f1fd2fb69d37fd3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/shared.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/auto/shared.h b/tests/auto/shared.h index b0ce6f942..52e105a36 100644 --- a/tests/auto/shared.h +++ b/tests/auto/shared.h @@ -171,9 +171,11 @@ inline QString objectFileName(const QString &baseName, const QString &profileNam { const SettingsPtr s = settings(); qbs::Profile profile(profileName, s.get()); - const auto tc = profile.value("qbs.toolchain").toStringList(); - const QString suffix = tc.contains("msvc") - || (tc.isEmpty() && qbs::Internal::HostOsInfo::isWindowsHost()) ? "obj" : "o"; + const auto tc = profile.value("qbs.toolchainType").toString(); + const auto tcList = profile.value("qbs.toolchain").toStringList(); + const bool isMsvc = tc == "msvc" || tcList.contains("msvc") + || (tc.isEmpty() && tcList.isEmpty() && qbs::Internal::HostOsInfo::isWindowsHost()); + const QString suffix = isMsvc ? "obj" : "o"; return baseName + '.' + suffix; } |