summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmMakefile.cxx12
-rw-r--r--Source/cmMakefile.h1
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;