本文整理汇总了C++中ToolChain类的典型用法代码示例。如果您正苦于以下问题:C++ ToolChain类的具体用法?C++ ToolChain怎么用?C++ ToolChain使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ToolChain类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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);
}
示例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";
}
示例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");
}
示例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);
}
示例6: typeId
bool ToolChain::operator == (const ToolChain &tc) const
{
if (this == &tc)
return true;
// We ignore displayname
return typeId() == tc.typeId() && isAutoDetected() == tc.isAutoDetected();
}
示例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();
}
示例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()));
}
}
示例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");
}
示例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();
}
示例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;
}
示例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();
}
示例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();
}
示例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;
}
示例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;
}