diff options
-rw-r--r-- | Source/cmFileAPICodemodel.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmFileAPICodemodel.cxx b/Source/cmFileAPICodemodel.cxx index 9061109..596edd1 100644 --- a/Source/cmFileAPICodemodel.cxx +++ b/Source/cmFileAPICodemodel.cxx @@ -46,6 +46,9 @@ namespace { +using TargetIndexMapType = + std::unordered_map<cmGeneratorTarget const*, Json::ArrayIndex>; + class Codemodel { cmFileAPI& FileAPI; @@ -94,6 +97,8 @@ class CodemodelConfig ProjectMap; std::vector<Project> Projects; + TargetIndexMapType TargetIndexMap; + void ProcessDirectories(); Json::ArrayIndex GetDirectoryIndex(cmLocalGenerator const* lg); @@ -663,6 +668,8 @@ Json::Value CodemodelConfig::DumpTarget(cmGeneratorTarget* gt, target["projectIndex"] = pi; this->Projects[pi].TargetIndexes.append(ti); + this->TargetIndexMap[gt] = ti; + return target; } |