Clang: Skip built-in includes when exporting the compilation database

We don't want to have compiler-specific paths there.

Change-Id: If26434ea3760d4f2ca4c25bbcf0340f4ea781072
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
Ivan Donchevskii
2018-09-17 09:26:56 +02:00
parent 0bd095aa45
commit eeece5b5ad
4 changed files with 18 additions and 2 deletions

View File

@@ -43,12 +43,14 @@ namespace CppTools {
CompilerOptionsBuilder::CompilerOptionsBuilder(const ProjectPart &projectPart,
UseSystemHeader useSystemHeader,
SkipBuiltIn skipBuiltInHeaderPaths,
QString clangVersion,
QString clangResourceDirectory)
: m_projectPart(projectPart)
, m_useSystemHeader(useSystemHeader)
, m_clangVersion(clangVersion)
, m_clangResourceDirectory(clangResourceDirectory)
, m_skipBuiltInHeaderPaths(skipBuiltInHeaderPaths)
{
}
@@ -237,7 +239,8 @@ void CompilerOptionsBuilder::addHeaderPathOptions()
m_options.append(includes);
m_options.append(systemIncludes);
m_options.append(builtInIncludes);
if (m_skipBuiltInHeaderPaths == SkipBuiltIn::No)
m_options.append(builtInIncludes);
}
void CompilerOptionsBuilder::addPrecompiledHeaderOptions(PchUsage pchUsage)