forked from qt-creator/qt-creator
ProjectExplorer: get clang cl version via windows api
If it fails fall back to executing clang-cl --version. Change-Id: Ia344f6eceb1ad2117dc2f7dc7f91b79daa2235ce Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -1546,6 +1546,12 @@ static const MsvcToolChain *findMsvcToolChain(const QString &displayedVarsBat)
|
|||||||
|
|
||||||
static QVersionNumber clangClVersion(const FilePath &clangClPath)
|
static QVersionNumber clangClVersion(const FilePath &clangClPath)
|
||||||
{
|
{
|
||||||
|
QString error;
|
||||||
|
QString dllversion = winGetDLLVersion(Utils::WinDLLFileVersion, clangClPath.toString(), &error);
|
||||||
|
|
||||||
|
if (!dllversion.isEmpty())
|
||||||
|
return QVersionNumber::fromString(dllversion);
|
||||||
|
|
||||||
QtcProcess clangClProcess;
|
QtcProcess clangClProcess;
|
||||||
clangClProcess.setCommand({clangClPath, {"--version"}});
|
clangClProcess.setCommand({clangClPath, {"--version"}});
|
||||||
clangClProcess.runBlocking();
|
clangClProcess.runBlocking();
|
||||||
|
Reference in New Issue
Block a user