CppTools: Take "-include" files into account

Fixes: QTCREATORBUG-20602
Change-Id: Ibfc518fc64ed75f93265db800558ec1d2e424bb4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Nikolai Kosjar
2018-06-11 12:52:04 +02:00
committed by Christian Kandeler
parent c05ad9a951
commit 888ea6bbbb
21 changed files with 130 additions and 20 deletions

View File

@@ -106,6 +106,7 @@ static ProjectPart::Ptr projectPartFromRawProjectPart(
}
part->precompiledHeaders = rawProjectPart.precompiledHeaders;
part->includedFiles = rawProjectPart.includedFiles;
part->selectedForBuilding = rawProjectPart.selectedForBuilding;
return part;
@@ -205,6 +206,11 @@ ProjectPart::Ptr ProjectInfoGenerator::createProjectPart(
part->extraCodeModelFlags = tcInfo.extraCodeModelFlags;
part->compilerFlags = flags.commandLineFlags;
part->warningFlags = flags.warningFlags;
if (part->includedFiles.isEmpty()) {
// The project manager did not provide the included files, so take
// the ones we were able to detect from the toolchain's command line.
part->includedFiles = flags.includedFiles;
}
part->language = language;
part->languageExtensions = flags.languageExtensions;