diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2016-12-21 13:49:49 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2016-12-21 15:19:03 +0000 |
commit | 6dc5cfdbc08d137b7b7a5d653bbd76a80c9ed6ab (patch) | |
tree | 3e4430cb86632abdf7e510ffb92b56d71c1b6416 | |
parent | e2e754ddd7e7d50b99aa99369c1f2b8611d43a55 (diff) |
Fix qbs-setup-toolchains with concretely specified MSVC
We must call init() on every MSVC object.
Also, MSVC::clPath must point to the directory where cl is.
This amends commit fb2cf69d.
Task-number: QBS-1084
Change-Id: Iaa8b3f6a5a0b88b998c2da31d9056f22a511d05d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r-- | src/app/qbs-setup-toolchains/msvcprobe.cpp | 1 | ||||
-rw-r--r-- | src/lib/corelib/tools/msvcinfo.h | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/app/qbs-setup-toolchains/msvcprobe.cpp b/src/app/qbs-setup-toolchains/msvcprobe.cpp index bb1838f2b..993e12377 100644 --- a/src/app/qbs-setup-toolchains/msvcprobe.cpp +++ b/src/app/qbs-setup-toolchains/msvcprobe.cpp @@ -310,6 +310,7 @@ void createMsvcProfile(const QString &profileName, const QString &compilerFilePa Settings *settings) { MSVC msvc(compilerFilePath); + msvc.init(); QList<Profile> dummy; addMSVCPlatform(settings, dummy, profileName, &msvc); qbsInfo() << Tr::tr("Profile '%1' created for '%2'.") diff --git a/src/lib/corelib/tools/msvcinfo.h b/src/lib/corelib/tools/msvcinfo.h index 61c70fc4a..aa0800aaa 100644 --- a/src/lib/corelib/tools/msvcinfo.h +++ b/src/lib/corelib/tools/msvcinfo.h @@ -75,6 +75,7 @@ public: MSVC(const QString &clPath) { QDir parentDir = QFileInfo(clPath).dir(); + binPath = parentDir.absolutePath(); QString parentDirName = parentDir.dirName().toLower(); if (parentDirName == QLatin1String("bin")) parentDirName = QStringLiteral("x86"); @@ -82,7 +83,6 @@ public: parentDir.cdUp(); architecture = parentDirName; vcInstallPath = parentDir.path(); - binPath = vcInstallPath; } QBS_EXPORT void init(); |