Commit c7608041 authored by Ivan Donchevskii's avatar Ivan Donchevskii

Clang: always use -isystem for compiler options builder

We always provide the full includes list ourselves so
it will not change the includes order.

Change-Id: I84ee2ca7f05bfb71ae400f0e9e0b8f52810252b3
Reviewed-by: Marco Bubke's avatarMarco Bubke <marco.bubke@qt.io>
Reviewed-by: Nikolai Kosjar's avatarNikolai Kosjar <nikolai.kosjar@qt.io>
parent c2165718
......@@ -120,16 +120,20 @@ private:
if (m_projectPart.qtVersion != CppTools::ProjectPart::NoQt) {
const QString wrappedQtCoreHeaderPath = wrappedQtHeadersPath + "/QtCore";
add(includeDirOption() + QDir::toNativeSeparators(wrappedQtHeadersPath));
add(includeDirOption() + QDir::toNativeSeparators(wrappedQtCoreHeaderPath));
add(includeDirOption());
add(QDir::toNativeSeparators(wrappedQtHeadersPath));
add(includeDirOption());
add(QDir::toNativeSeparators(wrappedQtCoreHeaderPath));
}
}
void addDummyUiHeaderOnDiskIncludePath()
{
const QString path = ModelManagerSupportClang::instance()->dummyUiHeaderOnDiskDirPath();
if (!path.isEmpty())
add(includeDirOption() + QDir::toNativeSeparators(path));
if (!path.isEmpty()) {
add(includeDirOption());
add(QDir::toNativeSeparators(path));
}
}
};
......
......@@ -136,7 +136,8 @@ void CompilerOptionsBuilder::addHeaderPathOptions()
break;
}
result.append(prefix + QDir::toNativeSeparators(headerPath.path));
result.append(prefix);
result.append(QDir::toNativeSeparators(headerPath.path));
}
m_options.append(result);
......@@ -399,7 +400,7 @@ void CompilerOptionsBuilder::addDefineFunctionMacrosMsvc()
QString CompilerOptionsBuilder::includeDirOption() const
{
return QLatin1String("-I");
return QLatin1String("-isystem");
}
QByteArray CompilerOptionsBuilder::macroOption(const ProjectExplorer::Macro &macro) const
......@@ -501,7 +502,8 @@ void CompilerOptionsBuilder::addPredefinedHeaderPathsOptions()
void CompilerOptionsBuilder::addClangIncludeFolder()
{
QTC_CHECK(!m_clangVersion.isEmpty());
add(includeDirOption() + clangIncludeDirectory());
add(includeDirOption());
add(clangIncludeDirectory());
}
void CompilerOptionsBuilder::addProjectConfigFileInclude()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment