summaryrefslogtreecommitdiffstats
path: root/tools/configure
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-10-17 11:02:54 +0200
committerLiang Qi <liang.qi@qt.io>2016-10-17 11:02:54 +0200
commitd90b155c6034bc16a9eb2d5794f101cde4ea9e2c (patch)
treee648b8db6b9e8e8d7f0c765ac2953b066524eb49 /tools/configure
parentb00565bc2803bb783e8f2b0d02becfa73323e283 (diff)
parentd71bb504a635b51a85f3ccd919e0d77f869e50a8 (diff)
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')
-rw-r--r--tools/configure/environment.cpp3
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);