diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2016-10-10 13:57:33 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2016-10-14 13:08:47 +0000 |
commit | b884fc00f4cb4b1ebe307374433b90448d413cf4 (patch) | |
tree | 7bdb76c6a40b5c2377269e822fddf933f12e6e20 /tools/configure | |
parent | adbafab4ef921b2336511a21cb4300eafa1f4cad (diff) |
configure.exe: Detect MSVC version with environment variable CL cleared
The variable may contain the option /nologo, suppressing the output.
Change-Id: I63eedde10aa7264cf56807a0844cadf6293a1d8c
Task-number: QTBUG-56388
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'tools/configure')
-rw-r--r-- | tools/configure/environment.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/configure/environment.cpp b/tools/configure/environment.cpp index 10cf5ace2a..562c5db7a7 100644 --- a/tools/configure/environment.cpp +++ b/tools/configure/environment.cpp @@ -176,6 +176,7 @@ 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';; |