Commit 4b1f8f36 authored by Filippo Cucchetto's avatar Filippo Cucchetto
Browse files

ProjectExplorer: Added support for registering custom languages



Change-Id: I728a2ed1ef7d9f44d7c2b59d27d6e23444cd3bb5
Reviewed-by: Tobias Hunger's avatarTobias Hunger <tobias.hunger@qt.io>
parent 35690ab6
......@@ -499,11 +499,11 @@ FileName AndroidConfig::toolPath(const Abi &abi, const QString &ndkToolChainVers
.arg(toolsPrefix(abi)));
}
FileName AndroidConfig::gccPath(const Abi &abi, ToolChain::Language lang,
FileName AndroidConfig::gccPath(const Abi &abi, Core::Id lang,
const QString &ndkToolChainVersion) const
{
const QString tool
= HostOsInfo::withExecutableSuffix(QString::fromLatin1(lang == ToolChain::Language::C ? "-gcc" : "-g++"));
= HostOsInfo::withExecutableSuffix(QString::fromLatin1(lang == Core::Id(ProjectExplorer::Constants::C_LANGUAGE_ID) ? "-gcc" : "-g++"));
return toolPath(abi, ndkToolChainVersion).appendString(tool);
}
......@@ -1215,10 +1215,10 @@ static bool matchKits(const Kit *a, const Kit *b)
if (QtSupport::QtKitInformation::qtVersion(a) != QtSupport::QtKitInformation::qtVersion(b))
return false;
return matchToolChain(ToolChainKitInformation::toolChain(a, ToolChain::Language::Cxx),
ToolChainKitInformation::toolChain(b, ToolChain::Language::Cxx))
&& matchToolChain(ToolChainKitInformation::toolChain(a, ToolChain::Language::C),
ToolChainKitInformation::toolChain(b, ToolChain::Language::C));
return matchToolChain(ToolChainKitInformation::toolChain(a, ProjectExplorer::Constants::CXX_LANGUAGE_ID),
ToolChainKitInformation::toolChain(b, ProjectExplorer::Constants::CXX_LANGUAGE_ID))
&& matchToolChain(ToolChainKitInformation::toolChain(a, ProjectExplorer::Constants::C_LANGUAGE_ID),
ToolChainKitInformation::toolChain(b, ProjectExplorer::Constants::C_LANGUAGE_ID));
}
void AndroidConfigurations::registerNewToolChains()
......@@ -1250,7 +1250,7 @@ void AndroidConfigurations::updateAutomaticKitList()
// Update code for 3.0 beta, which shipped with a bug for the debugger settings
for (Kit *k : existingKits) {
ToolChain *tc = ToolChainKitInformation::toolChain(k, ToolChain::Language::Cxx);
ToolChain *tc = ToolChainKitInformation::toolChain(k, ProjectExplorer::Constants::CXX_LANGUAGE_ID);
if (tc && Debugger::DebuggerKitInformation::runnable(k).executable != tc->suggestedDebugger().toString()) {
Debugger::DebuggerItem debugger;
debugger.setCommand(tc->suggestedDebugger());
......@@ -1297,7 +1297,7 @@ void AndroidConfigurations::updateAutomaticKitList()
return static_cast<AndroidToolChain *>(tc);
});
for (AndroidToolChain *tc : toolchains) {
if (tc->isSecondaryToolChain() || tc->language() != ToolChain::Language::Cxx)
if (tc->isSecondaryToolChain() || tc->language() != Core::Id(ProjectExplorer::Constants::CXX_LANGUAGE_ID))
continue;
const QList<AndroidToolChain *> allLanguages = Utils::filtered(toolchains,
[tc](AndroidToolChain *otherTc) {
......
......@@ -126,8 +126,7 @@ public:
Utils::FileName emulatorToolPath() const;
Utils::FileName gccPath(const ProjectExplorer::Abi &abi,
ProjectExplorer::ToolChain::Language lang,
Utils::FileName gccPath(const ProjectExplorer::Abi &abi, Core::Id lang,
const QString &ndkToolChainVersion) const;
Utils::FileName gdbPath(const ProjectExplorer::Abi &abi, const QString &ndkToolChainVersion) const;
......
......@@ -31,6 +31,7 @@
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
#include <projectexplorer/toolchain.h>
......@@ -114,7 +115,7 @@ QList<Core::Id> AndroidDeployConfigurationFactory::availableCreationIds(Target *
if (!parent->project()->supportsKit(parent->kit()))
return ids;
ToolChain *tc = ToolChainKitInformation::toolChain(parent->kit(), ToolChain::Language::Cxx);
ToolChain *tc = ToolChainKitInformation::toolChain(parent->kit(), ProjectExplorer::Constants::CXX_LANGUAGE_ID);
if (!tc || tc->targetAbi().osFlavor() != Abi::AndroidLinuxFlavor)
return ids;
......
......@@ -178,7 +178,7 @@ bool AndroidDeployQtStep::init(QList<const BuildStep *> &earlierSteps)
m_libdir = QLatin1String("lib");
if (info.cpuAbi.contains(QLatin1String("arm64-v8a")) ||
info.cpuAbi.contains(QLatin1String("x86_64"))) {
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(target()->kit(), ToolChain::Language::Cxx);
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(target()->kit(), ProjectExplorer::Constants::CXX_LANGUAGE_ID);
if (tc && tc->targetAbi().wordWidth() == 64) {
m_appProcessBinaries << QLatin1String("/system/bin/app_process64");
m_libdir += QLatin1String("64");
......
......@@ -38,6 +38,8 @@
#include <QVBoxLayout>
#include <QFormLayout>
#include <projectexplorer/projectexplorerconstants.h>
#include <qtsupport/baseqtversion.h>
#include <qtsupport/qtkitinformation.h>
......@@ -82,7 +84,7 @@ Core::Id AndroidGdbServerKitInformation::id()
bool AndroidGdbServerKitInformation::isAndroidKit(const Kit *kit)
{
QtSupport::BaseQtVersion *qt = QtSupport::QtKitInformation::qtVersion(kit);
ToolChain *tc = ToolChainKitInformation::toolChain(kit, ToolChain::Language::Cxx);
ToolChain *tc = ToolChainKitInformation::toolChain(kit, ProjectExplorer::Constants::CXX_LANGUAGE_ID);
if (qt && tc)
return qt->type() == QLatin1String(Constants::ANDROIDQT)
&& tc->typeId() == Constants::ANDROID_TOOLCHAIN_ID;
......@@ -102,7 +104,7 @@ void AndroidGdbServerKitInformation::setGdbSever(Kit *kit, const FileName &gdbSe
FileName AndroidGdbServerKitInformation::autoDetect(const Kit *kit)
{
ToolChain *tc = ToolChainKitInformation::toolChain(kit, ToolChain::Language::Cxx);
ToolChain *tc = ToolChainKitInformation::toolChain(kit, ProjectExplorer::Constants::CXX_LANGUAGE_ID);
if (!tc || tc->typeId() != Constants::ANDROID_TOOLCHAIN_ID)
return FileName();
auto atc = static_cast<AndroidToolChain *>(tc);
......
......@@ -39,6 +39,7 @@
#include <projectexplorer/toolchainmanager.h>
#include <projectexplorer/kitmanager.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtversionmanager.h>
......@@ -314,7 +315,7 @@ void AndroidSettingsWidget::check(AndroidSettingsWidget::Mode mode)
// Check for a gdb with a broken python
QStringList gdbPaths;
foreach (const AndroidToolChainFactory::AndroidToolChainInformation &ati, compilerPaths) {
if (ati.language == ProjectExplorer::ToolChain::Language::C)
if (ati.language == Core::Id(ProjectExplorer::Constants::C_LANGUAGE_ID))
continue;
// we only check the arm gdbs, that's indicative enough
if (ati.abi.architecture() != ProjectExplorer::Abi::ArmArchitecture)
......@@ -332,7 +333,7 @@ void AndroidSettingsWidget::check(AndroidSettingsWidget::Mode mode)
// See if we have qt versions for those toolchains
QSet<ProjectExplorer::Abi> toolchainsForAbi;
foreach (const AndroidToolChainFactory::AndroidToolChainInformation &ati, compilerPaths) {
if (ati.language == ProjectExplorer::ToolChain::Language::Cxx)
if (ati.language == Core::Id(ProjectExplorer::Constants::CXX_LANGUAGE_ID))
toolchainsForAbi.insert(ati.abi);
}
......
......@@ -63,14 +63,14 @@ static const char ANDROID_NDK_TC_VERION[] = "Qt4ProjectManager.Android.NDK_TC_VE
QHash<Abi, QList<int> > AndroidToolChainFactory::m_newestVersionForAbi;
FileName AndroidToolChainFactory::m_ndkLocation;
AndroidToolChain::AndroidToolChain(const Abi &abi, const QString &ndkToolChainVersion, Language l, Detection d)
AndroidToolChain::AndroidToolChain(const Abi &abi, const QString &ndkToolChainVersion, Core::Id l, Detection d)
: GccToolChain(Constants::ANDROID_TOOLCHAIN_ID, d),
m_ndkToolChainVersion(ndkToolChainVersion), m_secondaryToolChain(false)
{
setLanguage(l);
setTargetAbi(abi);
setDisplayName(QString::fromLatin1("Android GCC (%1, %2-%3)")
.arg(ToolChain::languageDisplayName(l),
.arg(ToolChainManager::displayNameOfLanguageId(l),
AndroidConfig::displayName(targetAbi()),
ndkToolChainVersion));
}
......@@ -264,9 +264,9 @@ AndroidToolChainFactory::AndroidToolChainFactory()
setDisplayName(tr("Android GCC"));
}
QSet<ToolChain::Language> Android::Internal::AndroidToolChainFactory::supportedLanguages() const
QSet<Core::Id> Android::Internal::AndroidToolChainFactory::supportedLanguages() const
{
return { ToolChain::Language::Cxx };
return { ProjectExplorer::Constants::CXX_LANGUAGE_ID };
}
QList<ToolChain *> AndroidToolChainFactory::autoDetect(const QList<ToolChain *> &alreadyKnown)
......@@ -303,7 +303,8 @@ QList<AndroidToolChainFactory::AndroidToolChainInformation> AndroidToolChainFact
int idx = versionRegExp.indexIn(fileName);
if (idx == -1)
continue;
for (const ToolChain::Language lang : { ToolChain::Language::Cxx, ToolChain::Language::C }) {
for (const Core::Id lang : { ProjectExplorer::Constants::CXX_LANGUAGE_ID,
ProjectExplorer::Constants::C_LANGUAGE_ID }) {
AndroidToolChainInformation ati;
ati.language = lang;
ati.version = fileName.mid(idx + 1);
......@@ -364,7 +365,7 @@ bool AndroidToolChainFactory::versionCompareLess(QList<AndroidToolChain *> atc,
return versionCompareLess(a, b);
}
static AndroidToolChain *findToolChain(Utils::FileName &compilerPath, ToolChain::Language lang,
static AndroidToolChain *findToolChain(Utils::FileName &compilerPath, Core::Id lang,
const QList<ToolChain *> &alreadyKnown)
{
return static_cast<AndroidToolChain *>(
......@@ -400,7 +401,7 @@ AndroidToolChainFactory::autodetectToolChainsForNdk(const FileName &ndkPath,
if (abi.architecture() == Abi::UnknownArchitecture) // e.g. mipsel which is not yet supported
continue;
QList<AndroidToolChain *> toolChainBundle;
for (ToolChain::Language lang : { ToolChain::Language::Cxx, ToolChain::Language::C }) {
for (Core::Id lang : { ProjectExplorer::Constants::CXX_LANGUAGE_ID, ProjectExplorer::Constants::C_LANGUAGE_ID }) {
FileName compilerPath = AndroidConfigurations::currentConfig().gccPath(abi, lang, version);
AndroidToolChain *tc = findToolChain(compilerPath, lang, alreadyKnown);
......
......@@ -63,7 +63,7 @@ protected:
private:
explicit AndroidToolChain(const ProjectExplorer::Abi &abi, const QString &ndkToolChainVersion,
Language l, Detection d);
Core::Id l, Detection d);
AndroidToolChain();
AndroidToolChain(const AndroidToolChain &);
......@@ -95,7 +95,7 @@ class AndroidToolChainFactory : public ProjectExplorer::ToolChainFactory
public:
AndroidToolChainFactory();
QSet<ProjectExplorer::ToolChain::Language> supportedLanguages() const override;
QSet<Core::Id> supportedLanguages() const override;
QList<ProjectExplorer::ToolChain *> autoDetect(const QList<ProjectExplorer::ToolChain *> &alreadyKnown) override;
bool canRestore(const QVariantMap &data) override;
......@@ -104,7 +104,7 @@ public:
class AndroidToolChainInformation
{
public:
ProjectExplorer::ToolChain::Language language;
Core::Id language;
Utils::FileName compilerCommand;
ProjectExplorer::Abi abi;
QString version;
......
......@@ -69,7 +69,7 @@ void AutoTestUnitTests::initTestCase()
else
QSKIP("Could not figure out which Qt version is used for default kit.");
const ToolChain * const toolchain = ToolChainKitInformation::toolChain(allKits.first(),
ToolChain::Language::Cxx);
ProjectExplorer::Constants::CXX_LANGUAGE_ID);
if (!toolchain)
QSKIP("This test requires that there is a kit with a toolchain.");
......
......@@ -269,7 +269,7 @@ void MakeStepConfigWidget::updateDetails()
param.setArguments(arguments);
m_summaryText = param.summary(displayName());
} else {
m_summaryText = QLatin1String("<b>") + ProjectExplorer::ToolChainKitInformation::msgNoToolChainInTarget() + QLatin1String("</b>");
m_summaryText = QLatin1String("<b>") + ToolChainKitInformation::msgNoToolChainInTarget() + QLatin1String("</b>");
}
emit updateSummary();
......
......@@ -175,7 +175,7 @@ static QList<Target *> validTargets(Project *project)
return false;
}
const ToolChain * const toolchain = ToolChainKitInformation::toolChain(kit, ToolChain::Language::Cxx);
const ToolChain * const toolchain = ToolChainKitInformation::toolChain(kit, ProjectExplorer::Constants::CXX_LANGUAGE_ID);
QTC_ASSERT(toolchain, return false);
bool hasClangExecutable;
clangExecutableFromSettings(toolchain->typeId(), &hasClangExecutable);
......
......@@ -85,7 +85,7 @@ ClangStaticAnalyzerRunControl::ClangStaticAnalyzerRunControl(
QTC_ASSERT(buildConfiguration, return);
m_environment = buildConfiguration->environment();
ToolChain *toolChain = ToolChainKitInformation::toolChain(target->kit(), ToolChain::Language::Cxx);
ToolChain *toolChain = ToolChainKitInformation::toolChain(target->kit(), ProjectExplorer::Constants::CXX_LANGUAGE_ID);
QTC_ASSERT(toolChain, return);
m_targetTriple = toolChain->originalTargetTriple();
}
......@@ -445,7 +445,7 @@ static QDebug operator<<(QDebug debug, const AnalyzeUnits &analyzeUnits)
static Core::Id toolchainType(ProjectExplorer::RunConfiguration *runConfiguration)
{
QTC_ASSERT(runConfiguration, return Core::Id());
return ToolChainKitInformation::toolChain(runConfiguration->target()->kit(), ToolChain::Language::Cxx)->typeId();
return ToolChainKitInformation::toolChain(runConfiguration->target()->kit(), ProjectExplorer::Constants::CXX_LANGUAGE_ID)->typeId();
}
static QString executableForVersionCheck(Core::Id toolchainType, const QString &executable)
......
......@@ -73,7 +73,7 @@ bool ClangStaticAnalyzerRunControlFactory::canRun(RunConfiguration *runConfigura
QTC_ASSERT(target, return false);
Kit *kit = target->kit();
QTC_ASSERT(kit, return false);
ToolChain *toolChain = ToolChainKitInformation::toolChain(kit, ToolChain::Language::Cxx);
ToolChain *toolChain = ToolChainKitInformation::toolChain(kit, ProjectExplorer::Constants::CXX_LANGUAGE_ID);
return toolChain;
}
......
......@@ -62,7 +62,7 @@ void ClangStaticAnalyzerUnitTests::initTestCase()
if (allKits.count() != 1)
QSKIP("This test requires exactly one kit to be present");
const ToolChain * const toolchain = ToolChainKitInformation::toolChain(allKits.first(),
ToolChain::Language::Cxx);
Constants::CXX_LANGUAGE_ID);
if (!toolchain)
QSKIP("This test requires that there is a kit with a toolchain.");
bool hasClangExecutable;
......
......@@ -31,6 +31,7 @@
#include "tealeafreader.h"
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
using namespace ProjectExplorer;
......@@ -63,10 +64,10 @@ BuildDirReader::Parameters::Parameters(const CMakeBuildConfiguration *bc)
pathMapper = cmake->pathMapper();
isAutorun = cmake->isAutoRun();
auto tc = ProjectExplorer::ToolChainKitInformation::toolChain(k, ProjectExplorer::ToolChain::Language::Cxx);
auto tc = ProjectExplorer::ToolChainKitInformation::toolChain(k, ProjectExplorer::Constants::CXX_LANGUAGE_ID);
if (tc)
cxxToolChainId = tc->id();
tc = ProjectExplorer::ToolChainKitInformation::toolChain(k, ProjectExplorer::ToolChain::Language::C);
tc = ProjectExplorer::ToolChainKitInformation::toolChain(k, ProjectExplorer::Constants::C_LANGUAGE_ID);
if (tc)
cToolChainId = tc->id();
sysRoot = ProjectExplorer::SysRootKitInformation::sysRoot(k);
......
......@@ -311,7 +311,7 @@ QVariant CMakeGeneratorKitInformation::defaultValue(const Kit *k) const
if (Utils::HostOsInfo::isWindowsHost()) {
// *sigh* Windows with its zoo of incompatible stuff again...
ToolChain *tc = ToolChainKitInformation::toolChain(k, ToolChain::Language::Cxx);
ToolChain *tc = ToolChainKitInformation::toolChain(k, Constants::CXX_LANGUAGE_ID);
if (tc && tc->typeId() == ProjectExplorer::Constants::MINGW_TOOLCHAIN_TYPEID) {
it = std::find_if(known.constBegin(), known.constEnd(),
[extraGenerator](const CMakeTool::Generator &g) {
......@@ -531,8 +531,8 @@ QVariant CMakeConfigurationKitInformation::defaultValue(const Kit *k) const
QList<Task> CMakeConfigurationKitInformation::validate(const Kit *k) const
{
const QtSupport::BaseQtVersion *const version = QtSupport::QtKitInformation::qtVersion(k);
const ToolChain *const tcC = ToolChainKitInformation::toolChain(k, ToolChain::Language::C);
const ToolChain *const tcCxx = ToolChainKitInformation::toolChain(k, ToolChain::Language::Cxx);
const ToolChain *const tcC = ToolChainKitInformation::toolChain(k, Constants::C_LANGUAGE_ID);
const ToolChain *const tcCxx = ToolChainKitInformation::toolChain(k, Constants::CXX_LANGUAGE_ID);
const CMakeConfig config = configuration(k);
const bool isQt4 = version && version->qtVersion() < QtSupport::QtVersionNumber(5, 0, 0);
......
......@@ -154,7 +154,7 @@ void CMakeProject::updateProjectData(CMakeBuildConfiguration *bc)
createGeneratedCodeModelSupport();
ToolChain *tc = ToolChainKitInformation::toolChain(k, ToolChain::Language::Cxx);
ToolChain *tc = ToolChainKitInformation::toolChain(k, ProjectExplorer::Constants::CXX_LANGUAGE_ID);
if (!tc) {
emit fileListChanged();
return;
......
......@@ -344,8 +344,8 @@ QSet<Id> TeaLeafReader::updateCodeModel(CppTools::ProjectPartBuilder &ppBuilder)
// CMake shuffles the include paths that it reports via the CodeBlocks generator
// So remove the toolchain include paths, so that at least those end up in the correct
// place.
auto cxxflags = getFlagsFor(cbt, targetDataCacheCxx, ToolChain::Language::Cxx);
auto cflags = getFlagsFor(cbt, targetDataCacheC, ToolChain::Language::C);
auto cxxflags = getFlagsFor(cbt, targetDataCacheCxx, ProjectExplorer::Constants::CXX_LANGUAGE_ID);
auto cflags = getFlagsFor(cbt, targetDataCacheC, ProjectExplorer::Constants::C_LANGUAGE_ID);
QSet<FileName> tcIncludes;
QStringList includePaths;
if (tcCxx || tcC) {
......@@ -547,7 +547,7 @@ void TeaLeafReader::processCMakeError()
QStringList TeaLeafReader::getFlagsFor(const CMakeBuildTarget &buildTarget,
QHash<QString, QStringList> &cache,
ToolChain::Language lang)
Id lang)
{
// check cache:
auto it = cache.constFind(buildTarget.title);
......@@ -566,20 +566,16 @@ QStringList TeaLeafReader::getFlagsFor(const CMakeBuildTarget &buildTarget,
bool TeaLeafReader::extractFlagsFromMake(const CMakeBuildTarget &buildTarget,
QHash<QString, QStringList> &cache,
ToolChain::Language lang)
Id lang)
{
QString flagsPrefix;
switch (lang)
{
case ToolChain::Language::Cxx:
if (lang == ProjectExplorer::Constants::CXX_LANGUAGE_ID)
flagsPrefix = QLatin1String("CXX_FLAGS =");
break;
case ToolChain::Language::C:
else if (lang == ProjectExplorer::Constants::C_LANGUAGE_ID)
flagsPrefix = QLatin1String("C_FLAGS =");
break;
default:
else
return false;
}
QString makeCommand = buildTarget.makeCommand.toString();
int startIndex = makeCommand.indexOf('\"');
......@@ -625,24 +621,19 @@ bool TeaLeafReader::extractFlagsFromMake(const CMakeBuildTarget &buildTarget,
bool TeaLeafReader::extractFlagsFromNinja(const CMakeBuildTarget &buildTarget,
QHash<QString, QStringList> &cache,
ProjectExplorer::ToolChain::Language lang)
Id lang)
{
Q_UNUSED(buildTarget)
if (!cache.isEmpty()) // We fill the cache in one go!
return false;
QString compilerPrefix;
switch (lang)
{
case ToolChain::Language::Cxx:
if (lang == ProjectExplorer::Constants::CXX_LANGUAGE_ID)
compilerPrefix = QLatin1String("CXX_COMPILER");
break;
case ToolChain::Language::C:
else if (lang == ProjectExplorer::Constants::C_LANGUAGE_ID)
compilerPrefix = QLatin1String("C_COMPILER");
break;
default:
else
return false;
}
// Attempt to find build.ninja file and obtain FLAGS (CXX_FLAGS/C_FLAGS) from there if no suitable flags.make were
// found
......
......@@ -70,9 +70,9 @@ private:
void processCMakeOutput();
void processCMakeError();
QStringList getFlagsFor(const CMakeBuildTarget &buildTarget, QHash<QString, QStringList> &cache, ProjectExplorer::ToolChain::Language lang);
bool extractFlagsFromMake(const CMakeBuildTarget &buildTarget, QHash<QString, QStringList> &cache, ProjectExplorer::ToolChain::Language lang);
bool extractFlagsFromNinja(const CMakeBuildTarget &buildTarget, QHash<QString, QStringList> &cache, ProjectExplorer::ToolChain::Language lang);
QStringList getFlagsFor(const CMakeBuildTarget &buildTarget, QHash<QString, QStringList> &cache, Core::Id lang);
bool extractFlagsFromMake(const CMakeBuildTarget &buildTarget, QHash<QString, QStringList> &cache, Core::Id lang);
bool extractFlagsFromNinja(const CMakeBuildTarget &buildTarget, QHash<QString, QStringList> &cache, Core::Id lang);
Utils::QtcProcess *m_cmakeProcess = nullptr;
......
......@@ -296,10 +296,10 @@ ToolChainInterfacePtr BaseProjectPartBuilder::selectToolChain(
ToolChainInterfacePtr toolChain = nullptr;
if (languageVersion <= ProjectPart::LatestCVersion)
toolChain = m_project->toolChain(ProjectExplorer::ToolChain::Language::C, m_cFlags);
toolChain = m_project->toolChain(ProjectExplorer::Constants::C_LANGUAGE_ID, m_cFlags);
if (!toolChain) // Use Cxx toolchain for C projects without C compiler in kit and for C++ code
toolChain = m_project->toolChain(ProjectExplorer::ToolChain::Language::Cxx, m_cxxFlags);
toolChain = m_project->toolChain(ProjectExplorer::Constants::CXX_LANGUAGE_ID, m_cxxFlags);
return toolChain;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment