cmMakefile: Add imported target accessor

This commit is contained in:
Stephen Kelly 2015-10-26 22:18:20 +01:00
parent 0fb187cc58
commit 7a6caae1a7
2 changed files with 13 additions and 0 deletions

View File

@ -1766,6 +1766,18 @@ const char* cmMakefile::GetCurrentBinaryDirectory() const
return this->StateSnapshot.GetDirectory().GetCurrentBinary();
}
std::vector<cmTarget*> cmMakefile::GetImportedTargets() const
{
std::vector<cmTarget*> tgts;
tgts.reserve(this->ImportedTargets.size());
for (TargetMap::const_iterator it = this->ImportedTargets.begin();
it != this->ImportedTargets.end(); ++it)
{
tgts.push_back(it->second);
}
return tgts;
}
//----------------------------------------------------------------------------
void cmMakefile::AddIncludeDirectories(const std::vector<std::string> &incs,
bool before)

View File

@ -390,6 +390,7 @@ public:
{
return this->ImportedTargetsOwned;
}
std::vector<cmTarget*> GetImportedTargets() const;
cmTarget* FindTarget(const std::string& name,
bool excludeAliases = false) const;