Nim: Added support for the Nim compiler inside Kits

Change-Id: I6f9761aac0b0fc02a6974b284a7d600c1ece5b8b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Filippo Cucchetto
2017-01-21 23:36:14 +01:00
parent bb916860ca
commit 28d9c305ad
11 changed files with 545 additions and 16 deletions

View File

@@ -25,12 +25,13 @@
#include "nimcompilerbuildstep.h"
#include "nimbuildconfiguration.h"
#include "nimconstants.h"
#include "nimcompilerbuildstepconfigwidget.h"
#include "nimproject.h"
#include "../nimconstants.h"
#include "nimtoolchain.h"
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/kitinformation.h>
#include <utils/qtcassert.h>
#include <QDir>
@@ -154,7 +155,12 @@ void NimCompilerBuildStep::updateOutFilePath()
void NimCompilerBuildStep::updateCommand()
{
processParameters()->setCommand(QStringLiteral("nim"));
QTC_ASSERT(target(), return);
QTC_ASSERT(target()->kit(), return);
Kit *kit = target()->kit();
auto tc = dynamic_cast<NimToolChain*>(ToolChainKitInformation::toolChain(kit, Constants::C_NIMLANGUAGE_ID));
QTC_ASSERT(tc, return);
processParameters()->setCommand(tc->compilerCommand().toString());
}
void NimCompilerBuildStep::updateWorkingDirectory()