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>bb10
parent
adbafab4ef
commit
b884fc00f4
|
|
@ -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';;
|
||||
|
|
|
|||
Loading…
Reference in New Issue