diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 47d254e32..6b5cb973c 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1606,6 +1606,7 @@ void cmGlobalGenerator::CreateGeneratorTargets(TargetTypes targetTypes, { cmGeneratorTarget* gt = new cmGeneratorTarget(*j, lg); this->GeneratorTargets[*j] = gt; + lg->AddImportedGeneratorTarget(gt); } } diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 9d5335ec5..1bc7f810b 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -455,6 +455,11 @@ void cmLocalGenerator::AddGeneratorTarget(cmGeneratorTarget* gt) this->GeneratorTargets.push_back(gt); } +void cmLocalGenerator::AddImportedGeneratorTarget(cmGeneratorTarget* gt) +{ + this->ImportedGeneratorTargets.push_back(gt); +} + struct NamedGeneratorTargetFinder { NamedGeneratorTargetFinder(std::string const& name) diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 91a476fa0..7841d0528 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -121,6 +121,7 @@ public: } void AddGeneratorTarget(cmGeneratorTarget* gt); + void AddImportedGeneratorTarget(cmGeneratorTarget* gt); cmGeneratorTarget* FindGeneratorTarget(const std::string& name) const; cmGeneratorTarget* FindGeneratorTargetToUse(const std::string& name) const; @@ -373,6 +374,7 @@ protected: std::set WarnCMP0063; std::vector GeneratorTargets; + std::vector ImportedGeneratorTargets; std::map AliasTargets; bool EmitUniversalBinaryFlags;