forked from qt-creator/qt-creator
ProjectExplorer: Rename compiler includes from System to BuiltIn
System include are those used with -isystem keyword, built-in includes on the other hand come from compiler and always follow in the end of the include list (after system includes). Change-Id: I95c2fec36d2e5b43f014fe0a88d59c6769edfa1f Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -106,8 +106,8 @@ static QString getArch(const QString &triple)
|
||||
// Paths added here are those that were used by qmake. They were taken from
|
||||
// *qtsource*/qtbase/mkspecs/common/android-base-head.conf
|
||||
// Adding them here allows us to use them for all build systems.
|
||||
static void addSystemHeaderPaths(ProjectExplorer::HeaderPaths &paths,
|
||||
const QString &triple, const QString &version)
|
||||
static void addBuiltInHeaderPaths(ProjectExplorer::HeaderPaths &paths,
|
||||
const QString &triple, const QString &version)
|
||||
{
|
||||
const Utils::FileName ndkPath = AndroidConfigurations::currentConfig().ndkLocation();
|
||||
|
||||
@@ -120,24 +120,24 @@ static void addSystemHeaderPaths(ProjectExplorer::HeaderPaths &paths,
|
||||
Utils::FileName includePath = stdcppPath;
|
||||
Utils::FileName cppLibsPath = stdcppPath;
|
||||
cppLibsPath.appendPath("libs/" + getArch(triple) + "/include/");
|
||||
paths.prepend({cppLibsPath.toString(), ProjectExplorer::HeaderPathType::System});
|
||||
paths.prepend({cppLibsPath.toString(), ProjectExplorer::HeaderPathType::BuiltIn});
|
||||
includePath.appendPath("include/");
|
||||
paths.prepend({includePath.toString(), ProjectExplorer::HeaderPathType::System});
|
||||
paths.prepend({includePath.toString(), ProjectExplorer::HeaderPathType::BuiltIn});
|
||||
|
||||
paths.prepend({ndkPath.toString() + "/sysroot/usr/include/" + triple,
|
||||
ProjectExplorer::HeaderPathType::System});
|
||||
ProjectExplorer::HeaderPathType::BuiltIn});
|
||||
paths.prepend({ndkPath.toString() + "/sysroot/usr/include",
|
||||
ProjectExplorer::HeaderPathType::System});
|
||||
ProjectExplorer::HeaderPathType::BuiltIn});
|
||||
}
|
||||
|
||||
AndroidToolChain::SystemHeaderPathsRunner AndroidToolChain::createSystemHeaderPathsRunner() const
|
||||
AndroidToolChain::BuiltInHeaderPathsRunner AndroidToolChain::createBuiltInHeaderPathsRunner() const
|
||||
{
|
||||
const QString triple = originalTargetTriple();
|
||||
const QString version = this->version();
|
||||
initExtraHeaderPathsFunction([triple, version] (HeaderPaths &paths) {
|
||||
addSystemHeaderPaths(paths, triple, version);
|
||||
addBuiltInHeaderPaths(paths, triple, version);
|
||||
});
|
||||
return GccToolChain::createSystemHeaderPathsRunner();
|
||||
return GccToolChain::createBuiltInHeaderPathsRunner();
|
||||
}
|
||||
|
||||
QString AndroidToolChain::typeDisplayName() const
|
||||
|
||||
Reference in New Issue
Block a user