forked from qt-creator/qt-creator
Qmake: Suppress spurious warnings about compiler mismatch on Apple
Suppress spurious warnings about compiler mismatches on Apple all the time at the cost of potentially supressing some real issues. Task-number: QTCREATORBUG-17794 Change-Id: I7bef3b8065de676d625905f3bf9936c91094b04f Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -1281,6 +1281,11 @@ void QmakeProject::testToolChain(ToolChain *tc, const Utils::FileName &path) con
|
||||
if (!env.isSameExecutable(path.toString(), expected.toString())) {
|
||||
const QPair<Utils::FileName, Utils::FileName> pair = qMakePair(expected, path);
|
||||
if (!m_toolChainWarnings.contains(pair)) {
|
||||
// Suppress warnings on Apple machines where compilers in /usr/bin point into Xcode.
|
||||
// This will suppress some valid warnings, but avoids annoying Apple users with
|
||||
// spurious warnings all the time!
|
||||
if (!pair.first.toString().startsWith("/usr/bin/")
|
||||
|| !pair.second.toString().contains("/Contents/Developer/Toolchains/")) {
|
||||
TaskHub::addTask(Task(Task::Warning,
|
||||
QCoreApplication::translate("QmakeProjectManager", "\"%1\" is used by qmake, but \"%2\" is configured in the kit.\n"
|
||||
"Please update your kit or choose a mkspec for qmake that matches your target environment better.").
|
||||
@@ -1290,6 +1295,7 @@ void QmakeProject::testToolChain(ToolChain *tc, const Utils::FileName &path) con
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void QmakeProject::warnOnToolChainMismatch(const QmakeProFile *pro) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user