ToolChains: Implement detection of toolchains based on compiler path

Do not bother to implement this functionality for toolchains that are
assumed to be completely auto-detected (e.g. MSVC) or require
infrastructure around the toolchains to be useful (e.g. embedded platforms).

Change-Id: I3e7dfe2f3c30a0d2d2bb16364895151f95b16423
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Tobias Hunger
2017-02-07 14:18:32 +01:00
parent 578af1e701
commit fe695bd2ba
4 changed files with 53 additions and 0 deletions

View File

@@ -101,6 +101,17 @@ QList<ToolChain *> NimToolChainFactory::autoDetect(const QList<ToolChain *> &alr
return result;
}
QList<ToolChain *> NimToolChainFactory::autoDetect(const FileName &compilerPath, const Core::Id &language)
{
QList<ToolChain *> result;
if (language == Constants::C_NIMLANGUAGE_ID) {
auto tc = new NimToolChain(ToolChain::ManualDetection);
tc->setCompilerCommand(compilerPath);
result.append(tc);
}
return result;
}
NimToolChainConfigWidget::NimToolChainConfigWidget(NimToolChain *tc)
: ToolChainConfigWidget(tc)
, m_compilerCommand(new PathChooser)