forked from qt-creator/qt-creator
QmakePM: Show kit name in compiler mismatch message
Change-Id: Ib5bfd90064c525a7b599434d31ab704e8e110d1a Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
e4469dbbe2
commit
3c8dec2398
@@ -1292,12 +1292,15 @@ void QmakeProject::testToolChain(ToolChain *tc, const Utils::FileName &path) con
|
|||||||
const Utils::FileName expected = tc->compilerCommand();
|
const Utils::FileName expected = tc->compilerCommand();
|
||||||
|
|
||||||
Environment env = Environment::systemEnvironment();
|
Environment env = Environment::systemEnvironment();
|
||||||
|
Kit *k = nullptr;
|
||||||
if (Target *t = activeTarget()) {
|
if (Target *t = activeTarget()) {
|
||||||
|
k = t->kit();
|
||||||
if (BuildConfiguration *bc = t->activeBuildConfiguration())
|
if (BuildConfiguration *bc = t->activeBuildConfiguration())
|
||||||
env = bc->environment();
|
env = bc->environment();
|
||||||
else
|
else
|
||||||
t->kit()->addToEnvironment(env);
|
k->addToEnvironment(env);
|
||||||
}
|
}
|
||||||
|
QTC_ASSERT(k, return);
|
||||||
|
|
||||||
if (env.isSameExecutable(path.toString(), expected.toString()))
|
if (env.isSameExecutable(path.toString(), expected.toString()))
|
||||||
return;
|
return;
|
||||||
@@ -1316,9 +1319,9 @@ void QmakeProject::testToolChain(ToolChain *tc, const Utils::FileName &path) con
|
|||||||
QCoreApplication::translate(
|
QCoreApplication::translate(
|
||||||
"QmakeProjectManager",
|
"QmakeProjectManager",
|
||||||
"\"%1\" is used by qmake, but \"%2\" is configured in the kit.\n"
|
"\"%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 "
|
"Please update your kit (%3) or choose a mkspec for qmake that matches "
|
||||||
"your target environment better.")
|
"your target environment better.")
|
||||||
.arg(path.toUserOutput()).arg(expected.toUserOutput()),
|
.arg(path.toUserOutput()).arg(expected.toUserOutput()).arg(k->displayName()),
|
||||||
Utils::FileName(), -1, ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
|
Utils::FileName(), -1, ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
|
||||||
m_toolChainWarnings.insert(pair);
|
m_toolChainWarnings.insert(pair);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user