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,14 +131,15 @@ ToolChain::BuiltInHeaderPathsRunner CustomToolChain::createBuiltInHeaderPathsRun
|
||||
|
||||
void CustomToolChain::addToEnvironment(Environment &env) const
|
||||
{
|
||||
if (!m_compilerCommand.isEmpty()) {
|
||||
const FilePath path = m_compilerCommand.parentDir();
|
||||
const FilePath compiler = compilerCommand();
|
||||
if (compiler.isEmpty())
|
||||
return;
|
||||
const FilePath path = compiler.parentDir();
|
||||
env.prependOrSetPath(path);
|
||||
const FilePath makePath = m_makeCommand.parentDir();
|
||||
if (makePath != path)
|
||||
env.prependOrSetPath(makePath);
|
||||
}
|
||||
}
|
||||
|
||||
QStringList CustomToolChain::suggestedMkspecList() const
|
||||
{
|
||||
@@ -252,8 +253,7 @@ bool CustomToolChain::operator ==(const ToolChain &other) const
|
||||
return false;
|
||||
|
||||
auto customTc = static_cast<const CustomToolChain *>(&other);
|
||||
return m_compilerCommand == customTc->m_compilerCommand
|
||||
&& m_makeCommand == customTc->m_makeCommand
|
||||
return m_makeCommand == customTc->m_makeCommand
|
||||
&& targetAbi() == customTc->targetAbi()
|
||||
&& m_predefinedMacros == customTc->m_predefinedMacros
|
||||
&& m_builtInHeaderPaths == customTc->m_builtInHeaderPaths;
|
||||
|
@@ -83,7 +83,6 @@ private:
|
||||
|
||||
CustomParserSettings customParserSettings() const;
|
||||
|
||||
Utils::FilePath m_compilerCommand;
|
||||
Utils::FilePath m_makeCommand;
|
||||
|
||||
Macros m_predefinedMacros;
|
||||
|
Reference in New Issue
Block a user