diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-10-26 21:18:20 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-27 06:44:25 (GMT) |
commit | 7a6caae1a78e8d67422b144ceffdd97595f67683 (patch) | |
tree | 17f4dc4caf0a2862c368c15482b768655b95911c | |
parent | 0fb187cc589b83ded107d9a9a1971830efb6c751 (diff) | |
download | CMake-7a6caae1a78e8d67422b144ceffdd97595f67683.zip CMake-7a6caae1a78e8d67422b144ceffdd97595f67683.tar.gz CMake-7a6caae1a78e8d67422b144ceffdd97595f67683.tar.bz2 |
cmMakefile: Add imported target accessor
-rw-r--r-- | Source/cmMakefile.cxx | 12 | ||||
-rw-r--r-- | Source/cmMakefile.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 8f72f67..ffe92af 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -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) diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 01c4524..f1dd374 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -390,6 +390,7 @@ public: { return this->ImportedTargetsOwned; } + std::vector<cmTarget*> GetImportedTargets() const; cmTarget* FindTarget(const std::string& name, bool excludeAliases = false) const; |