本文整理汇总了C++中ToolChain类的典型用法代码示例。如果您正苦于以下问题:C++ ToolChain类的具体用法?C++ ToolChain怎么用?C++ ToolChain使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ToolChain类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: target
QStringList IosBuildStep::defaultArguments() const
{
QStringList res;
Kit *kit = target()->kit();
ToolChain *tc = ToolChainKitInformation::toolChain(kit);
switch (target()->activeBuildConfiguration()->buildType()) {
case BuildConfiguration::Debug :
res << QLatin1String("-configuration") << QLatin1String("Debug");
break;
case BuildConfiguration::Release :
res << QLatin1String("-configuration") << QLatin1String("Release");
break;
case BuildConfiguration::Unknown :
break;
default:
qCWarning(iosLog) << "IosBuildStep had an unknown buildType "
<< target()->activeBuildConfiguration()->buildType();
}
if (tc->typeId() == ProjectExplorer::Constants::GCC_TOOLCHAIN_TYPEID
|| tc->typeId() == ProjectExplorer::Constants::CLANG_TOOLCHAIN_TYPEID) {
GccToolChain *gtc = static_cast<GccToolChain *>(tc);
res << gtc->platformCodeGenFlags();
}
if (!SysRootKitInformation::sysRoot(kit).isEmpty())
res << QLatin1String("-sdk") << SysRootKitInformation::sysRoot(kit).toString();
res << QLatin1String("SYMROOT=") + IosManager::resDirForTarget(target());
return res;
}
开发者ID:aheubusch,项目名称:qt-creator,代码行数:28,代码来源:iosbuildstep.cpp
示例2: foreach
void ProfileChooser::init(bool hostAbiOnly)
{
const Abi hostAbi = Abi::hostAbi();
foreach (const Profile *st, ProfileManager::instance()->profiles()) {
if (!st->isValid())
continue;
ToolChain *tc = ToolChainProfileInformation::toolChain(st);
if (!tc)
continue;
const Abi abi = tc->targetAbi();
if (hostAbiOnly && hostAbi.os() != abi.os())
continue;
const QString debuggerCommand = DebuggerProfileInformation::debuggerCommand(st).toString();
if (debuggerCommand.isEmpty())
continue;
const QString completeBase = QFileInfo(debuggerCommand).completeBaseName();
const QString name = tr("%1 (%2)").arg(st->displayName(), completeBase);
addItem(name, qVariantFromValue(st->id()));
QString debugger = QDir::toNativeSeparators(debuggerCommand);
debugger.replace(QString(QLatin1Char(' ')), QLatin1String(" "));
QString toolTip = tr("<html><head/><body><table>"
"<tr><td>ABI:</td><td><i>%1</i></td></tr>"
"<tr><td>Debugger:</td><td>%2</td></tr>")
.arg(st->displayName(), QDir::toNativeSeparators(debugger));
setItemData(count() - 1, toolTip, Qt::ToolTipRole);
}
setEnabled(count() > 1);
}
开发者ID:KDE,项目名称:android-qt-creator,代码行数:30,代码来源:debuggertoolchaincombobox.cpp
示例3: automaticallyAddedArguments
QStringList MakeStep::automaticallyAddedArguments() const
{
ToolChain *tc = ToolChainKitInformation::toolChain(target()->kit(), ProjectExplorer::Constants::CXX_LANGUAGE_ID);
if (!tc || tc->targetAbi().binaryFormat() == Abi::PEFormat)
return QStringList();
return QStringList() << "-w" << "-r";
}
开发者ID:choenig,项目名称:qt-creator,代码行数:7,代码来源:makestep.cpp
示例4: automaticallyAddedArguments
QStringList MakeStep::automaticallyAddedArguments() const
{
ToolChain *tc = ToolChainKitInformation::toolChain(target()->kit());
if (!tc || tc->targetAbi().binaryFormat() == Abi::PEFormat)
return QStringList();
return QStringList() << QLatin1String("-w") << QLatin1String("-r");
}
开发者ID:gnuhub,项目名称:qt-creator,代码行数:7,代码来源:makestep.cpp
示例5: foreach
void QmakeKitInformation::setup(Kit *k)
{
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(k);
if (!version)
return;
if (version->type() == "Boot2Qt.QtVersionType") // HACK: Ignore boot2Qt kits!
return;
FileName spec = QmakeKitInformation::mkspec(k);
if (spec.isEmpty())
spec = version->mkspec();
ToolChain *tc = ToolChainKitInformation::toolChain(k, ToolChain::Language::Cxx);
if (!tc || (!tc->suggestedMkspecList().empty() && !tc->suggestedMkspecList().contains(spec))) {
ToolChain *possibleTc = nullptr;
foreach (ToolChain *current, ToolChainManager::toolChains()) {
if (current->language() == ToolChain::Language::Cxx
&& version->qtAbis().contains(current->targetAbi())) {
possibleTc = current;
if (current->suggestedMkspecList().contains(spec))
break;
}
}
if (possibleTc)
ToolChainKitInformation::setToolChain(k, possibleTc);
}
开发者ID:qtproject,项目名称:qt-creator,代码行数:29,代码来源:qmakekitinformation.cpp
示例6: typeId
bool ToolChain::operator == (const ToolChain &tc) const
{
if (this == &tc)
return true;
// We ignore displayname
return typeId() == tc.typeId() && isAutoDetected() == tc.isAutoDetected();
}
开发者ID:UIKit0,项目名称:qt-creator,代码行数:8,代码来源:toolchain.cpp
示例7: m_qtVersion
Qt4BuildConfiguration::LastKitState::LastKitState(Kit *k)
: m_qtVersion(QtKitInformation::qtVersionId(k)),
m_sysroot(SysRootKitInformation::sysRoot(k).toString()),
m_mkspec(QmakeKitInformation::mkspec(k).toString())
{
ToolChain *tc = ToolChainKitInformation::toolChain(k);
m_toolchain = tc ? tc->id() : QString();
}
开发者ID:kaltsi,项目名称:sailfish-qtcreator,代码行数:8,代码来源:qt4buildconfiguration.cpp
示例8: addArchSpecificRPath
void tools::addArchSpecificRPath(const ToolChain &TC, const ArgList &Args,
ArgStringList &CmdArgs) {
std::string CandidateRPath = TC.getArchSpecificLibPath();
if (TC.getVFS().exists(CandidateRPath)) {
CmdArgs.push_back("-rpath");
CmdArgs.push_back(Args.MakeArgString(CandidateRPath.c_str()));
}
}
开发者ID:jacobly0,项目名称:llvm-z80,代码行数:8,代码来源:CommonArgs.cpp
示例9: makeCommand
QString DMakeStep::makeCommand(const Utils::Environment &environment) const
{
ToolChain *tc = ToolChainKitInformation::toolChain(target()->kit(), ToolChain::Language::Cxx);
if (tc)
return tc->makeCommand(environment);
else
return QLatin1String("dmd");
}
开发者ID:GoldMax,项目名称:QtCreatorD,代码行数:8,代码来源:dmakestep.cpp
示例10: FileName
FileName AndroidGdbServerKitInformation::autoDetect(Kit *kit)
{
ToolChain *tc = ToolChainKitInformation::toolChain(kit);
if (!tc || tc->type() != QLatin1String(Constants::ANDROID_TOOLCHAIN_TYPE))
return FileName();
AndroidToolChain *atc = static_cast<AndroidToolChain *>(tc);
return atc->suggestedGdbServer();
}
开发者ID:AltarBeastiful,项目名称:qt-creator,代码行数:8,代码来源:androidgdbserverkitinformation.cpp
示例11: isAndroidKit
bool AndroidGdbServerKitInformation::isAndroidKit(const Kit *kit)
{
QtSupport::BaseQtVersion *qt = QtSupport::QtKitInformation::qtVersion(kit);
ToolChain *tc = ToolChainKitInformation::toolChain(kit);
if (qt && tc)
return qt->type() == QLatin1String(Constants::ANDROIDQT)
&& tc->type() == QLatin1String(Constants::ANDROID_TOOLCHAIN_TYPE);
return false;
}
开发者ID:AltarBeastiful,项目名称:qt-creator,代码行数:10,代码来源:androidgdbserverkitinformation.cpp
示例12: target
ProjectExplorer::Abi RunConfiguration::abi() const
{
BuildConfiguration *bc = target()->activeBuildConfiguration();
if (!bc)
return Abi::hostAbi();
ToolChain *tc = bc->toolChain();
if (!tc)
return Abi::hostAbi();
return tc->targetAbi();
}
开发者ID:AtlantisCD9,项目名称:Qt,代码行数:10,代码来源:runconfiguration.cpp
示例13: id
bool ToolChain::operator == (const ToolChain &tc) const
{
if (this == &tc)
return true;
const QString thisId = id().left(id().indexOf(QLatin1Char(':')));
const QString tcId = tc.id().left(tc.id().indexOf(QLatin1Char(':')));
// We ignore displayname
return thisId == tcId && isAutoDetected() == tc.isAutoDetected();
}
开发者ID:kaltsi,项目名称:sailfish-qtcreator,代码行数:11,代码来源:toolchain.cpp
示例14: qmakeBuildConfiguration
QString MakeStep::effectiveMakeCommand() const
{
QString makeCmd = m_makeCmd;
if (makeCmd.isEmpty()) {
QmakeBuildConfiguration *bc = qmakeBuildConfiguration();
ToolChain *tc = ToolChainKitInformation::toolChain(target()->kit());
if (bc && tc)
makeCmd = tc->makeCommand(bc->environment());
}
return makeCmd;
}
开发者ID:gnuhub,项目名称:qt-creator,代码行数:12,代码来源:makestep.cpp
示例15: makeCommand
QString GenericMakeStep::makeCommand(const Utils::Environment &environment) const
{
QString command = m_makeCommand;
if (command.isEmpty()) {
ToolChain *tc = ToolChainKitInformation::toolChain(target()->kit());
if (tc)
command = tc->makeCommand(environment);
else
command = QLatin1String("make");
}
return command;
}
开发者ID:mornelon,项目名称:QtCreator_compliments,代码行数:12,代码来源:genericmakestep.cpp
示例16: isPokySDKKit
bool PokySDKKitInformation::isPokySDKKit(const Kit *kit)
{
if (!kit->isAutoDetected())
return false;
ToolChain *tc = ToolChainKitInformation::toolChain(kit);
if (tc && !findEnvFromCompiler(tc->compilerCommand()).isEmpty())
return true;
else if (!findEnvFromSysroot(SysRootKitInformation::sysRoot(kit)).isEmpty())
return true;
else
return false;
}
开发者ID:fargies,项目名称:qtcreator-plugin-pokysdk,代码行数:12,代码来源:pokysdkkitinformation.cpp
示例17: setSummaryText
void MakeStepConfigWidget::updateDetails()
{
ToolChain *tc
= ToolChainKitInformation::toolChain(m_makeStep->target()->kit());
QmakeBuildConfiguration *bc = m_makeStep->qmakeBuildConfiguration();
if (!bc)
bc = qobject_cast<QmakeBuildConfiguration *>(m_makeStep->target()->activeBuildConfiguration());
if (tc && bc)
m_ui->makeLabel->setText(tr("Override %1:").arg(QDir::toNativeSeparators(tc->makeCommand(bc->environment()))));
else
m_ui->makeLabel->setText(tr("Make:"));
if (!tc) {
setSummaryText(tr("<b>Make:</b> %1").arg(ProjectExplorer::ToolChainKitInformation::msgNoToolChainInTarget()));
return;
}
if (!bc) {
setSummaryText(tr("<b>Make:</b> No Qt build configuration."));
return;
}
ProcessParameters param;
param.setMacroExpander(bc->macroExpander());
param.setWorkingDirectory(bc->buildDirectory().toString());
QString makeCmd = tc->makeCommand(bc->environment());
if (!m_makeStep->makeCommand().isEmpty())
makeCmd = m_makeStep->makeCommand();
param.setCommand(makeCmd);
QString args = m_makeStep->userArguments();
Utils::Environment env = bc->environment();
Utils::Environment::setupEnglishOutput(&env);
// We prepend "L" to the MAKEFLAGS, so that nmake / jom are less verbose
// FIXME doing this without the user having a way to override this is rather bad
if (tc && m_makeStep->makeCommand().isEmpty()) {
if (tc->targetAbi().os() == Abi::WindowsOS
&& tc->targetAbi().osFlavor() != Abi::WindowsMSysFlavor) {
const QString makeFlags = QLatin1String("MAKEFLAGS");
env.set(makeFlags, QLatin1Char('L') + env.value(makeFlags));
}
}
param.setArguments(args);
param.setEnvironment(env);
if (param.commandMissing())
setSummaryText(tr("<b>Make:</b> %1 not found in the environment.").arg(makeCmd)); // Override display text
else
setSummaryText(param.summaryInWorkdir(displayName()));
}
开发者ID:gnuhub,项目名称:qt-creator,代码行数:51,代码来源:makestep.cpp
示例18: qmakeBuildConfiguration
QString MakeStep::effectiveMakeCommand() const
{
QString makeCmd = m_makeCmd;
if (makeCmd.isEmpty()) {
QmakeBuildConfiguration *bc = qmakeBuildConfiguration();
if (!bc)
bc = qobject_cast<QmakeBuildConfiguration *>(target()->activeBuildConfiguration());
ToolChain *tc = ToolChainKitInformation::toolChain(target()->kit(), ProjectExplorer::Constants::CXX_LANGUAGE_ID);
if (bc && tc)
makeCmd = tc->makeCommand(bc->environment());
}
return makeCmd;
}
开发者ID:choenig,项目名称:qt-creator,代码行数:14,代码来源:makestep.cpp
示例19: getArchNameForCompilerRTLib
static StringRef getArchNameForCompilerRTLib(const ToolChain &TC,
const ArgList &Args) {
const llvm::Triple &Triple = TC.getTriple();
bool IsWindows = Triple.isOSWindows();
if (Triple.isWindowsMSVCEnvironment() && TC.getArch() == llvm::Triple::x86)
return "i386";
if (TC.getArch() == llvm::Triple::arm || TC.getArch() == llvm::Triple::armeb)
return (arm::getARMFloatABI(TC, Args) == arm::FloatABI::Hard && !IsWindows)
? "armhf"
: "arm";
return TC.getArchName();
}
开发者ID:alessandrostone,项目名称:metashell,代码行数:15,代码来源:ToolChain.cpp
示例20: addOpenMPRuntime
bool tools::addOpenMPRuntime(ArgStringList &CmdArgs, const ToolChain &TC,
const ArgList &Args, bool IsOffloadingHost,
bool GompNeedsRT) {
if (!Args.hasFlag(options::OPT_fopenmp, options::OPT_fopenmp_EQ,
options::OPT_fno_openmp, false))
return false;
switch (TC.getDriver().getOpenMPRuntime(Args)) {
case Driver::OMPRT_OMP:
CmdArgs.push_back("-lomp");
break;
case Driver::OMPRT_GOMP:
CmdArgs.push_back("-lgomp");
if (GompNeedsRT)
CmdArgs.push_back("-lrt");
break;
case Driver::OMPRT_IOMP5:
CmdArgs.push_back("-liomp5");
break;
case Driver::OMPRT_Unknown:
// Already diagnosed.
return false;
}
if (IsOffloadingHost)
CmdArgs.push_back("-lomptarget");
addArchSpecificRPath(TC, Args, CmdArgs);
return true;
}
开发者ID:jacobly0,项目名称:llvm-z80,代码行数:32,代码来源:CommonArgs.cpp
注:本文中的ToolChain类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论