Просмотр исходного кода

cmTarget: add support for querying all file set names

Ben Boeckel 3 лет назад
Родитель
Сommit
aaa18f15cf
2 измененных файлов с 12 добавлено и 0 удалено
  1. 11 0
      Source/cmTarget.cxx
  2. 1 0
      Source/cmTarget.h

+ 11 - 0
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;

+ 1 - 0
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);