本文整理汇总了C++中projectexplorer::ToolChain::originalTargetTriple方法的典型用法代码示例。如果您正苦于以下问题:C++ ToolChain::originalTargetTriple方法的具体用法?C++ ToolChain::originalTargetTriple怎么用?C++ ToolChain::originalTargetTriple使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类projectexplorer::ToolChain
的用法示例。
在下文中一共展示了ToolChain::originalTargetTriple方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createBuildInfo
BuildInfo CMakeBuildConfigurationFactory::createBuildInfo(const Kit *k,
const QString &sourceDir,
BuildType buildType) const
{
BuildInfo info(this);
info.kitId = k->id();
CMakeExtraBuildInfo extra;
extra.sourceDirectory = sourceDir;
CMakeConfigItem buildTypeItem;
switch (buildType) {
case BuildTypeNone:
info.typeName = tr("Build");
break;
case BuildTypeDebug:
buildTypeItem = {CMakeConfigItem("CMAKE_BUILD_TYPE", "Debug")};
info.typeName = tr("Debug");
info.buildType = BuildConfiguration::Debug;
break;
case BuildTypeRelease:
buildTypeItem = {CMakeConfigItem("CMAKE_BUILD_TYPE", "Release")};
info.typeName = tr("Release");
info.buildType = BuildConfiguration::Release;
break;
case BuildTypeMinSizeRel:
buildTypeItem = {CMakeConfigItem("CMAKE_BUILD_TYPE", "MinSizeRel")};
info.typeName = tr("Minimum Size Release");
info.buildType = BuildConfiguration::Release;
break;
case BuildTypeRelWithDebInfo:
buildTypeItem = {CMakeConfigItem("CMAKE_BUILD_TYPE", "RelWithDebInfo")};
info.typeName = tr("Release with Debug Information");
info.buildType = BuildConfiguration::Profile;
break;
default:
QTC_CHECK(false);
break;
}
if (!buildTypeItem.isNull())
extra.configuration.append(buildTypeItem);
const QString sysRoot = SysRootKitInformation::sysRoot(k).toString();
if (!sysRoot.isEmpty()) {
extra.configuration.append(CMakeConfigItem("CMAKE_SYSROOT", sysRoot.toUtf8()));
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(
k, ProjectExplorer::Constants::CXX_LANGUAGE_ID);
if (tc) {
const QByteArray targetTriple = tc->originalTargetTriple().toUtf8();
extra.configuration.append(CMakeConfigItem("CMAKE_C_COMPILER_TARGET", targetTriple));
extra.configuration.append(CMakeConfigItem("CMAKE_CXX_COMPILER_TARGET ", targetTriple));
}
}
info.extraInfo = QVariant::fromValue(extra);
return info;
}