forked from qt-creator/qt-creator
Update qbs submodule and adapt QbsProjectManager accordingly.
Change-Id: I29dc48b991fc04b599e60ae63a7f4b7978dc9f3d Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
committed by
Christian Kandeler
parent
bb3b649957
commit
aad5ca12c4
@@ -230,41 +230,13 @@ QVariantMap DefaultPropertyProvider::autoGeneratedProperties(const ProjectExplor
|
|||||||
const QString toolchainPrefix = extractToolchainPrefix(&compilerName);
|
const QString toolchainPrefix = extractToolchainPrefix(&compilerName);
|
||||||
if (!toolchainPrefix.isEmpty())
|
if (!toolchainPrefix.isEmpty())
|
||||||
data.insert(QLatin1String(CPP_TOOLCHAINPREFIX), toolchainPrefix);
|
data.insert(QLatin1String(CPP_TOOLCHAINPREFIX), toolchainPrefix);
|
||||||
data.insert(QLatin1String(CPP_COMPILERNAME), compilerName);
|
data.insert(QLatin1String(CPP_CXXCOMPILERNAME), compilerName);
|
||||||
if (targetAbi.os() != ProjectExplorer::Abi::WindowsOS
|
if (targetAbi.os() != ProjectExplorer::Abi::WindowsOS
|
||||||
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMSysFlavor) {
|
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMSysFlavor) {
|
||||||
data.insert(QLatin1String(CPP_LINKERNAME), compilerName);
|
data.insert(QLatin1String(CPP_LINKERNAME), compilerName);
|
||||||
}
|
}
|
||||||
data.insert(QLatin1String(CPP_TOOLCHAINPATH), cxxFileInfo.absolutePath());
|
data.insert(QLatin1String(CPP_TOOLCHAINPATH), cxxFileInfo.absolutePath());
|
||||||
|
|
||||||
QVariantMap m;
|
|
||||||
if (toolchain.contains(QLatin1String("clang"))) {
|
|
||||||
m[QLatin1String("c")] = m[QLatin1String("objc")] = QLatin1String("clang");
|
|
||||||
m[QLatin1String("cpp")] = m[QLatin1String("objcpp")] = QLatin1String("clang++");
|
|
||||||
} else if (toolchain.contains(QLatin1String("gcc"))) {
|
|
||||||
m[QLatin1String("c")] = m[QLatin1String("objc")] = QLatin1String("gcc");
|
|
||||||
m[QLatin1String("cpp")] = m[QLatin1String("objcpp")] = QLatin1String("g++");
|
|
||||||
}
|
|
||||||
const QString fullPrefix = cxxFileInfo.absolutePath() + QLatin1Char('/') + toolchainPrefix;
|
|
||||||
for (auto it = m.begin(); it != m.end();) {
|
|
||||||
const QString filePath = Utils::HostOsInfo::withExecutableSuffix(fullPrefix
|
|
||||||
+ it.value().toString());
|
|
||||||
if (QFile::exists(filePath)) {
|
|
||||||
it.value() = filePath;
|
|
||||||
++it;
|
|
||||||
} else {
|
|
||||||
it = m.erase(it);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!m.isEmpty())
|
|
||||||
data.insert(QLatin1String(CPP_COMPILERPATHBYLANGUAGE), m);
|
|
||||||
|
|
||||||
if (targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2013Flavor
|
|
||||||
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2015Flavor) {
|
|
||||||
const QLatin1String flags("/FS");
|
|
||||||
data.insert(QLatin1String(CPP_PLATFORMCFLAGS), flags);
|
|
||||||
data.insert(QLatin1String(CPP_PLATFORMCXXFLAGS), flags);
|
|
||||||
}
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,15 +38,11 @@ namespace Constants {
|
|||||||
const char QBS_TARGETOS[] = "qbs.targetOS";
|
const char QBS_TARGETOS[] = "qbs.targetOS";
|
||||||
const char QBS_SYSROOT[] = "qbs.sysroot";
|
const char QBS_SYSROOT[] = "qbs.sysroot";
|
||||||
const char QBS_ARCHITECTURE[] = "qbs.architecture";
|
const char QBS_ARCHITECTURE[] = "qbs.architecture";
|
||||||
const char QBS_ENDIANNESS[] = "qbs.endianness";
|
|
||||||
const char QBS_TOOLCHAIN[] = "qbs.toolchain";
|
const char QBS_TOOLCHAIN[] = "qbs.toolchain";
|
||||||
const char CPP_TOOLCHAINPATH[] = "cpp.toolchainInstallPath";
|
const char CPP_TOOLCHAINPATH[] = "cpp.toolchainInstallPath";
|
||||||
const char CPP_COMPILERPATHBYLANGUAGE[] = "cpp.compilerPathByLanguage";
|
|
||||||
const char CPP_TOOLCHAINPREFIX[] = "cpp.toolchainPrefix";
|
const char CPP_TOOLCHAINPREFIX[] = "cpp.toolchainPrefix";
|
||||||
const char CPP_COMPILERNAME[] = "cpp.compilerName";
|
const char CPP_CXXCOMPILERNAME[] = "cpp.cxxCompilerName";
|
||||||
const char CPP_LINKERNAME[] = "cpp.linkerName";
|
const char CPP_LINKERNAME[] = "cpp.linkerName";
|
||||||
const char CPP_PLATFORMCFLAGS[] = "cpp.platformCFlags";
|
|
||||||
const char CPP_PLATFORMCXXFLAGS[] = "cpp.platformCxxFlags";
|
|
||||||
const char CPP_PLATFORMPATH[] = "cpp.platformPath";
|
const char CPP_PLATFORMPATH[] = "cpp.platformPath";
|
||||||
const char CPP_XCODESDKNAME[] = "cpp.xcodeSdkName";
|
const char CPP_XCODESDKNAME[] = "cpp.xcodeSdkName";
|
||||||
const char CPP_XCODESDKVERSION[] = "cpp.xcodeSdkVersion";
|
const char CPP_XCODESDKVERSION[] = "cpp.xcodeSdkVersion";
|
||||||
|
|||||||
Submodule src/shared/qbs updated: b24c37c89f...2867e2712e
Reference in New Issue
Block a user