forked from qt-creator/qt-creator
ProjectExplorer/MSVC: Ignore warning options when looking for predefined macros
...since they should not have any effect on the macros. This potentially also reduces the cache. Change-Id: If50cfa50ce0fb29dff291bf2c329532fc6284644 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -146,10 +146,15 @@ LanguageVersion static languageVersionForMsvc(const Core::Id &language, const Ma
|
||||
}
|
||||
}
|
||||
|
||||
bool static hasFlagEffectOnMacros(const QString &arg)
|
||||
bool static hasFlagEffectOnMacros(const QString &flag)
|
||||
{
|
||||
if (arg.startsWith("-I"))
|
||||
return false;
|
||||
if (flag.startsWith("-") || flag.startsWith("/")) {
|
||||
const QString f = flag.mid(1);
|
||||
if (f.startsWith("I"))
|
||||
return false; // Skip include paths
|
||||
if (f.startsWith("w", Qt::CaseInsensitive))
|
||||
return false; // Skip warning options
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user