|
@@ -2196,6 +2196,25 @@ cmTarget* cmGlobalGenerator::FindTargetImpl(std::string const& name) const
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+cmGeneratorTarget*
|
|
|
|
|
+cmGlobalGenerator::FindGeneratorTargetImpl(std::string const& name) const
|
|
|
|
|
+{
|
|
|
|
|
+ for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i)
|
|
|
|
|
+ {
|
|
|
|
|
+ std::vector<cmGeneratorTarget*> tgts =
|
|
|
|
|
+ this->LocalGenerators[i]->GetGeneratorTargets();
|
|
|
|
|
+ for (std::vector<cmGeneratorTarget*>::iterator it = tgts.begin();
|
|
|
|
|
+ it != tgts.end(); ++it)
|
|
|
|
|
+ {
|
|
|
|
|
+ if ((*it)->GetName() == name)
|
|
|
|
|
+ {
|
|
|
|
|
+ return *it;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return 0;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
cmTarget*
|
|
cmTarget*
|
|
|
cmGlobalGenerator::FindImportedTargetImpl(std::string const& name) const
|
|
cmGlobalGenerator::FindImportedTargetImpl(std::string const& name) const
|
|
|
{
|
|
{
|
|
@@ -2215,6 +2234,25 @@ cmGlobalGenerator::FindImportedTargetImpl(std::string const& name) const
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+cmGeneratorTarget* cmGlobalGenerator::FindImportedGeneratorTargetImpl(
|
|
|
|
|
+ std::string const& name) const
|
|
|
|
|
+{
|
|
|
|
|
+ for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i)
|
|
|
|
|
+ {
|
|
|
|
|
+ std::vector<cmGeneratorTarget*> tgts =
|
|
|
|
|
+ this->LocalGenerators[i]->GetGeneratorTargets();
|
|
|
|
|
+ for (std::vector<cmGeneratorTarget*>::iterator it = tgts.begin();
|
|
|
|
|
+ it != tgts.end(); ++it)
|
|
|
|
|
+ {
|
|
|
|
|
+ if ((*it)->GetName() == name && (*it)->IsImportedGloballyVisible())
|
|
|
|
|
+ {
|
|
|
|
|
+ return *it;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return 0;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
//----------------------------------------------------------------------------
|
|
//----------------------------------------------------------------------------
|
|
|
cmTarget*
|
|
cmTarget*
|
|
|
cmGlobalGenerator::FindTarget(const std::string& name,
|
|
cmGlobalGenerator::FindTarget(const std::string& name,
|
|
@@ -2236,6 +2274,16 @@ cmGlobalGenerator::FindTarget(const std::string& name,
|
|
|
return this->FindImportedTargetImpl(name);
|
|
return this->FindImportedTargetImpl(name);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+cmGeneratorTarget*
|
|
|
|
|
+cmGlobalGenerator::FindGeneratorTarget(const std::string& name) const
|
|
|
|
|
+{
|
|
|
|
|
+ if (cmGeneratorTarget* tgt = this->FindGeneratorTargetImpl(name))
|
|
|
|
|
+ {
|
|
|
|
|
+ return tgt;
|
|
|
|
|
+ }
|
|
|
|
|
+ return this->FindImportedGeneratorTargetImpl(name);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
//----------------------------------------------------------------------------
|
|
//----------------------------------------------------------------------------
|
|
|
bool
|
|
bool
|
|
|
cmGlobalGenerator::NameResolvesToFramework(const std::string& libname) const
|
|
cmGlobalGenerator::NameResolvesToFramework(const std::string& libname) const
|