diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 8f72f67b56..ffe92af200 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 cmMakefile::GetImportedTargets() const +{ + std::vector 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 &incs, bool before) diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 01c4524225..f1dd374fb2 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -390,6 +390,7 @@ public: { return this->ImportedTargetsOwned; } + std::vector GetImportedTargets() const; cmTarget* FindTarget(const std::string& name, bool excludeAliases = false) const;