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();
|
||||
|
||||
Environment env = Environment::systemEnvironment();
|
||||
Target *t = target();
|
||||
QTC_ASSERT(t, return);
|
||||
|
||||
Kit *k = t->kit();
|
||||
if (BuildConfiguration *bc = t->activeBuildConfiguration())
|
||||
env = bc->environment();
|
||||
else
|
||||
k->addToEnvironment(env);
|
||||
QTC_ASSERT(m_buildConfiguration, return);
|
||||
Environment env = m_buildConfiguration->environment();
|
||||
|
||||
if (env.isSameExecutable(path.toString(), expected.toString()))
|
||||
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"
|
||||
"Please update your kit (%3) or choose a mkspec for qmake that matches "
|
||||
"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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user