diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2022-04-07 20:49:07 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2022-04-11 17:41:40 (GMT) |
commit | 05783b168d47c2062817d58cb0a905dd6893cf8b (patch) | |
tree | 671b0bad415aa64850bc97051f2ced469af3ed3d /Source/cmFileSet.h | |
parent | 4515d82088c5dcd8e08e117532c500992262b84b (diff) | |
download | CMake-05783b168d47c2062817d58cb0a905dd6893cf8b.zip CMake-05783b168d47c2062817d58cb0a905dd6893cf8b.tar.gz CMake-05783b168d47c2062817d58cb0a905dd6893cf8b.tar.bz2 |
cmFileSet: store visibility with the fileset
The visibility is intrinsic to the fileset, so store it with it. This
avoids recalculating it on every addition to the fileset.
Diffstat (limited to 'Source/cmFileSet.h')
-rw-r--r-- | Source/cmFileSet.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/Source/cmFileSet.h b/Source/cmFileSet.h index 3aad75f..5357e77 100644 --- a/Source/cmFileSet.h +++ b/Source/cmFileSet.h @@ -7,20 +7,38 @@ #include <string> #include <vector> +#include <cm/string_view> +#include <cmext/string_view> + #include "cmListFileCache.h" class cmCompiledGeneratorExpression; struct cmGeneratorExpressionDAGChecker; class cmGeneratorTarget; class cmLocalGenerator; +class cmMakefile; + +enum class cmFileSetVisibility +{ + Private, + Public, + Interface, +}; +cm::static_string_view cmFileSetVisibilityToName(cmFileSetVisibility vis); +cmFileSetVisibility cmFileSetVisibilityFromName(cm::string_view name, + cmMakefile* mf); +bool cmFileSetVisibilityIsForSelf(cmFileSetVisibility vis); +bool cmFileSetVisibilityIsForInterface(cmFileSetVisibility vis); class cmFileSet { public: - cmFileSet(std::string name, std::string type); + cmFileSet(std::string name, std::string type, + cmFileSetVisibility visibility); const std::string& GetName() const { return this->Name; } const std::string& GetType() const { return this->Type; } + cmFileSetVisibility GetVisibility() const { return this->Visibility; } void ClearDirectoryEntries(); void AddDirectoryEntry(BT<std::string> directories); @@ -61,6 +79,7 @@ public: private: std::string Name; std::string Type; + cmFileSetVisibility Visibility; std::vector<BT<std::string>> DirectoryEntries; std::vector<BT<std::string>> FileEntries; }; |