Merge remote-tracking branch 'origin/3.5'

Change-Id: I7b3ef276d438ff0f184a649153e8aeec08a9f8c9
This commit is contained in:
Eike Ziller
2015-08-04 13:15:51 +02:00
203 changed files with 6590 additions and 12601 deletions

View File

@@ -31,11 +31,12 @@
#include "defaultpropertyprovider.h"
#include "qbsconstants.h"
#include <projectexplorer/abi.h>
#include <projectexplorer/kit.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <qtsupport/baseqtversion.h>
#include <utils/hostosinfo.h>
#include <utils/qtcassert.h>
@@ -189,6 +190,9 @@ QVariantMap DefaultPropertyProvider::autoGeneratedProperties(const ProjectExplor
default:
break;
}
} else if (targetAbi.architecture() == ProjectExplorer::Abi::ArmArchitecture &&
targetAbi.os() == ProjectExplorer::Abi::MacOS) {
architecture.append(QLatin1String("v7"));
}
data.insert(QLatin1String(QBS_ARCHITECTURE), qbs::canonicalArchitecture(architecture));
@@ -226,41 +230,13 @@ QVariantMap DefaultPropertyProvider::autoGeneratedProperties(const ProjectExplor
const QString toolchainPrefix = extractToolchainPrefix(&compilerName);
if (!toolchainPrefix.isEmpty())
data.insert(QLatin1String(CPP_TOOLCHAINPREFIX), toolchainPrefix);
data.insert(QLatin1String(CPP_COMPILERNAME), compilerName);
data.insert(QLatin1String(CPP_CXXCOMPILERNAME), compilerName);
if (targetAbi.os() != ProjectExplorer::Abi::WindowsOS
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMSysFlavor) {
data.insert(QLatin1String(CPP_LINKERNAME), compilerName);
}
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;
}