forked from qt-creator/qt-creator
ProjectExplorer: Fix prepending executable path for custom toolchain
Amends c60c642fe5
.
Change-Id: I214c3d83ef5f1642d581e84f9219e929d765c471
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
f27444a213
commit
1478a36530
@@ -131,13 +131,14 @@ ToolChain::BuiltInHeaderPathsRunner CustomToolChain::createBuiltInHeaderPathsRun
|
|||||||
|
|
||||||
void CustomToolChain::addToEnvironment(Environment &env) const
|
void CustomToolChain::addToEnvironment(Environment &env) const
|
||||||
{
|
{
|
||||||
if (!m_compilerCommand.isEmpty()) {
|
const FilePath compiler = compilerCommand();
|
||||||
const FilePath path = m_compilerCommand.parentDir();
|
if (compiler.isEmpty())
|
||||||
env.prependOrSetPath(path);
|
return;
|
||||||
const FilePath makePath = m_makeCommand.parentDir();
|
const FilePath path = compiler.parentDir();
|
||||||
if (makePath != path)
|
env.prependOrSetPath(path);
|
||||||
env.prependOrSetPath(makePath);
|
const FilePath makePath = m_makeCommand.parentDir();
|
||||||
}
|
if (makePath != path)
|
||||||
|
env.prependOrSetPath(makePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList CustomToolChain::suggestedMkspecList() const
|
QStringList CustomToolChain::suggestedMkspecList() const
|
||||||
@@ -252,8 +253,7 @@ bool CustomToolChain::operator ==(const ToolChain &other) const
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
auto customTc = static_cast<const CustomToolChain *>(&other);
|
auto customTc = static_cast<const CustomToolChain *>(&other);
|
||||||
return m_compilerCommand == customTc->m_compilerCommand
|
return m_makeCommand == customTc->m_makeCommand
|
||||||
&& m_makeCommand == customTc->m_makeCommand
|
|
||||||
&& targetAbi() == customTc->targetAbi()
|
&& targetAbi() == customTc->targetAbi()
|
||||||
&& m_predefinedMacros == customTc->m_predefinedMacros
|
&& m_predefinedMacros == customTc->m_predefinedMacros
|
||||||
&& m_builtInHeaderPaths == customTc->m_builtInHeaderPaths;
|
&& m_builtInHeaderPaths == customTc->m_builtInHeaderPaths;
|
||||||
|
@@ -83,7 +83,6 @@ private:
|
|||||||
|
|
||||||
CustomParserSettings customParserSettings() const;
|
CustomParserSettings customParserSettings() const;
|
||||||
|
|
||||||
Utils::FilePath m_compilerCommand;
|
|
||||||
Utils::FilePath m_makeCommand;
|
Utils::FilePath m_makeCommand;
|
||||||
|
|
||||||
Macros m_predefinedMacros;
|
Macros m_predefinedMacros;
|
||||||
|
Reference in New Issue
Block a user