diff options
author | Liang Qi <liang.qi@qt.io> | 2016-10-17 11:02:54 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-10-17 11:02:54 +0200 |
commit | d90b155c6034bc16a9eb2d5794f101cde4ea9e2c (patch) | |
tree | e648b8db6b9e8e8d7f0c765ac2953b066524eb49 /tools/configure/environment.cpp | |
parent | b00565bc2803bb783e8f2b0d02becfa73323e283 (diff) | |
parent | d71bb504a635b51a85f3ccd919e0d77f869e50a8 (diff) | |
download | qtbase-d90b155c6034bc16a9eb2d5794f101cde4ea9e2c.tar.gz |
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
mkspecs/macx-ios-clang/features/resolve_config.prf
src/testlib/qtestcase.qdoc
Change-Id: Icefa63056ffb37106f35299a8f19165535571799
Diffstat (limited to 'tools/configure/environment.cpp')
-rw-r--r-- | tools/configure/environment.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/configure/environment.cpp b/tools/configure/environment.cpp index 1a05c9ce62..bf82f14159 100644 --- a/tools/configure/environment.cpp +++ b/tools/configure/environment.cpp @@ -154,12 +154,13 @@ QString Environment::msvcVersion() const QString command = QFile::decodeName(qgetenv("ComSpec")) + QLatin1String(" /c ") + QLatin1String(compilerInfo(CC_MSVC2015)->executable) + QLatin1String(" /? 2>&1"); + SetEnvironmentVariable(L"CL", NULL); // May contain /nologo, which suppresses the version. QString version = execute(command, &returnValue); if (returnValue != 0) { cout << "Could not get cl version" << returnValue << qPrintable(version) << '\n';; version.clear(); } else { - QRegExp versionRegexp(QStringLiteral("^.*Compiler Version ([0-9.]+) for.*$")); + QRegExp versionRegexp(QStringLiteral("^.*\\b(\\d{2,2}\\.\\d{2,2}\\.\\d{5,5})\\b.*$")); Q_ASSERT(versionRegexp.isValid()); if (versionRegexp.exactMatch(version)) { version = versionRegexp.cap(1); |