cmTarget: add support for querying all file set names

This commit is contained in:
Ben Boeckel
2022-04-27 15:03:38 -04:00
parent cc4e19710d
commit aaa18f15cf
2 changed files with 12 additions and 0 deletions

View File

@@ -2545,6 +2545,17 @@ std::string cmTarget::GetInterfaceFileSetsPropertyName(const std::string& type)
return ""; 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> cmTarget::GetAllInterfaceFileSets() const
{ {
std::vector<std::string> result; std::vector<std::string> result;

View File

@@ -292,6 +292,7 @@ public:
const std::string& type, const std::string& type,
cmFileSetVisibility vis); cmFileSetVisibility vis);
std::vector<std::string> GetAllFileSetNames() const;
std::vector<std::string> GetAllInterfaceFileSets() const; std::vector<std::string> GetAllInterfaceFileSets() const;
static std::string GetFileSetsPropertyName(const std::string& type); static std::string GetFileSetsPropertyName(const std::string& type);