summaryrefslogtreecommitdiff
path: root/tests/auto/shared.h
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2014-10-10 18:03:21 +0200
committerJoerg Bornemann <joerg.bornemann@digia.com>2014-10-10 18:03:21 +0200
commitf6d6fa5f0d9ae74ec146d702b054d610bbde1101 (patch)
tree42f376ab8457fbffda8020eeb15d95352077afcc /tests/auto/shared.h
parent55674b37aa0f574cc53454743e83cdbfed4e9941 (diff)
parent8f79bb3b8cc9cde18b6c7f1843494cc23fa524e5 (diff)
downloadqbs-f6d6fa5f0d9ae74ec146d702b054d610bbde1101.tar.gz
Merge remote-tracking branch 'origin/1.3'
Conflicts: share/qbs/modules/cpp/GenericGCC.qbs src/app/qbs-setup-toolchains/probe.cpp src/lib/corelib/buildgraph/buildgraph.cpp src/lib/corelib/language/language.cpp src/lib/corelib/language/language.h tests/auto/api/tst_api.cpp tests/auto/blackbox/tst_blackbox.cpp tests/auto/blackbox/tst_blackbox.h Change-Id: Ie337cd6b55ec1de4f906cb8311959eeb7bc6d686
Diffstat (limited to 'tests/auto/shared.h')
-rw-r--r--tests/auto/shared.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/shared.h b/tests/auto/shared.h
index 01621d772..df67e378f 100644
--- a/tests/auto/shared.h
+++ b/tests/auto/shared.h
@@ -30,6 +30,8 @@
#define QBS_TEST_SHARED_H
#include <tools/hostosinfo.h>
+#include <tools/profile.h>
+#include <tools/settings.h>
#include <QCryptographicHash>
#include <QFile>
@@ -120,4 +122,13 @@ inline void copyFileAndUpdateTimestamp(const QString &source, const QString &tar
touch(target);
}
+inline QString objectFileName(const QString &baseName, const QString &profileName)
+{
+ qbs::Settings settings((QString()));
+ qbs::Profile profile(profileName, &settings);
+ const QString suffix = profile.value("qbs.toolchain").toStringList().contains("msvc")
+ ? "obj" : "o";
+ return baseName + '.' + suffix;
+}
+
#endif // Include guard.