Skip to content

Commit

Permalink
adapt toolkit built-in header paths
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-rauch committed Jan 19, 2021
1 parent dbbf1ad commit bb34240
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/project_manager/ros_project.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ void ROSProject::buildCppCodeModel(const ROSUtils::WorkspaceInfo workspaceInfo,

ProjectExplorer::RawProjectParts rpps;

ToolChain *cxxToolChain = ToolChainKitAspect::toolChain(k, ProjectExplorer::Constants::CXX_LANGUAGE_ID);
const ToolChain *cxxToolChain = ToolChainKitAspect::cxxToolChain(k);

QString pattern = "^.*\\.(" + QRegularExpression::escape("c") +
"|" + QRegularExpression::escape("cc") +
Expand Down Expand Up @@ -520,7 +520,10 @@ void ROSProject::buildCppCodeModel(const ROSUtils::WorkspaceInfo workspaceInfo,
rpp.setMacros(ProjectExplorer::Macro::toMacros(defineArg.toUtf8()));

QSet<QString> toolChainIncludes;
for (const HeaderPath &hp : cxxToolChain->builtInHeaderPaths(targetInfo.flags, sysRoot, env)) {
const HeaderPaths header_paths = \
cxxToolChain->createBuiltInHeaderPathsRunner(env)\
(targetInfo.flags, sysRoot.toString(), QString());
for (const HeaderPath &hp : header_paths) {
toolChainIncludes.insert(hp.path);
}

Expand Down

0 comments on commit bb34240

Please sign in to comment.