summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2022-04-27 19:03:38 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2022-04-27 19:04:01 (GMT)
commitaaa18f15cf06ec8fd74e18875172b9215f17a088 (patch)
tree389f3954f18ed31651231ac318d24d244e2155f5
parentcc4e19710d4bc5ad5abe20121ac34e8003fae44e (diff)
downloadCMake-aaa18f15cf06ec8fd74e18875172b9215f17a088.zip
CMake-aaa18f15cf06ec8fd74e18875172b9215f17a088.tar.gz
CMake-aaa18f15cf06ec8fd74e18875172b9215f17a088.tar.bz2
cmTarget: add support for querying all file set names
-rw-r--r--Source/cmTarget.cxx11
-rw-r--r--Source/cmTarget.h1
2 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 61b3e4d..feb2ee3 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2545,6 +2545,17 @@ std::string cmTarget::GetInterfaceFileSetsPropertyName(const std::string& type)
return "";
}
+std::vector<std::string> cmTarget::GetAllFileSetNames() const
+{
+ std::vector<std::string> result;
+
+ for (auto const& it : this->impl->FileSets) {
+ result.push_back(it.first);
+ }
+
+ return result;
+}
+
std::vector<std::string> cmTarget::GetAllInterfaceFileSets() const
{
std::vector<std::string> result;
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 72497b3..5ed018e 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -292,6 +292,7 @@ public:
const std::string& type,
cmFileSetVisibility vis);
+ std::vector<std::string> GetAllFileSetNames() const;
std::vector<std::string> GetAllInterfaceFileSets() const;
static std::string GetFileSetsPropertyName(const std::string& type);