|
|
@@ -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;
|
|
|
}
|
|
|
|