summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2017-11-16 17:42:55 -0800
committerJake Petroules <jake.petroules@qt.io>2017-11-20 21:00:27 +0000
commit95c1e81382246f5235322eeb6876f77f65b22c19 (patch)
tree1f70b4f319ed40e75e9aecd205aeca7524b58e86
parent2ff14a89f8bd97e7c355596db548c8556f8cbdfb (diff)
downloadqbs-95c1e81382246f5235322eeb6876f77f65b22c19.tar.gz
Fix object filename test helper function to work with profile:none
The default Windows toolchain is MSVC, so if the profile doesn't set qbs.toolchain, use ".obj" as the object filename suffix if the host OS is Windows. Change-Id: Iaaee21ee3e80bc3ec532aac770c10a9378321e91 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r--tests/auto/shared.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/shared.h b/tests/auto/shared.h
index f2bda8591..05efbd708 100644
--- a/tests/auto/shared.h
+++ b/tests/auto/shared.h
@@ -170,8 +170,9 @@ inline QString objectFileName(const QString &baseName, const QString &profileNam
{
const SettingsPtr s = settings();
qbs::Profile profile(profileName, s.get());
- const QString suffix = profile.value("qbs.toolchain").toStringList().contains("msvc")
- ? "obj" : "o";
+ const auto tc = profile.value("qbs.toolchain").toStringList();
+ const QString suffix = tc.contains("msvc")
+ || (tc.isEmpty() && qbs::Internal::HostOsInfo::isWindowsHost()) ? "obj" : "o";
return baseName + '.' + suffix;
}