forked from qt-creator/qt-creator
QmakeProject: Use buildsystem's own build config for toolchain tests
It is currently only getting there if it's the active one, so it is not a real problem, but distracting. Change-Id: I1f83644a71a3f22e23f966e273c1a23cfc0cc6b7 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -1232,15 +1232,11 @@ void QmakeBuildSystem::testToolChain(ToolChain *tc, const FilePath &path) const
|
|||||||
|
|
||||||
const Utils::FilePath expected = tc->compilerCommand();
|
const Utils::FilePath expected = tc->compilerCommand();
|
||||||
|
|
||||||
Environment env = Environment::systemEnvironment();
|
|
||||||
Target *t = target();
|
Target *t = target();
|
||||||
QTC_ASSERT(t, return);
|
QTC_ASSERT(t, return);
|
||||||
|
|
||||||
Kit *k = t->kit();
|
QTC_ASSERT(m_buildConfiguration, return);
|
||||||
if (BuildConfiguration *bc = t->activeBuildConfiguration())
|
Environment env = m_buildConfiguration->environment();
|
||||||
env = bc->environment();
|
|
||||||
else
|
|
||||||
k->addToEnvironment(env);
|
|
||||||
|
|
||||||
if (env.isSameExecutable(path.toString(), expected.toString()))
|
if (env.isSameExecutable(path.toString(), expected.toString()))
|
||||||
return;
|
return;
|
||||||
@@ -1261,7 +1257,9 @@ void QmakeBuildSystem::testToolChain(ToolChain *tc, const FilePath &path) const
|
|||||||
"\"%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 (%3) 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(k->displayName())));
|
.arg(path.toUserOutput())
|
||||||
|
.arg(expected.toUserOutput())
|
||||||
|
.arg(t->kit()->displayName())));
|
||||||
m_toolChainWarnings.insert(pair);
|
m_toolChainWarnings.insert(pair);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user