From 7a6caae1a78e8d67422b144ceffdd97595f67683 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 26 Oct 2015 22:18:20 +0100 Subject: cmMakefile: Add imported target accessor --- Source/cmMakefile.cxx | 12 ++++++++++++ Source/cmMakefile.h | 1 + 2 files changed, 13 insertions(+) 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 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 01c4524..f1dd374 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; -- cgit v0.12