diff options
Diffstat (limited to 'Source/cmSearchPath.h')
| -rw-r--r-- | Source/cmSearchPath.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/Source/cmSearchPath.h b/Source/cmSearchPath.h index 09f9722..4c0cabb 100644 --- a/Source/cmSearchPath.h +++ b/Source/cmSearchPath.h @@ -29,10 +29,22 @@ public: cmSearchPath(const cmSearchPath&) = default; cmSearchPath& operator=(const cmSearchPath&) = default; - const std::vector<std::string>& GetPaths() const { return this->Paths; } + struct PathWithPrefix + { + std::string Path; + std::string Prefix; + + bool operator<(const PathWithPrefix& other) const + { + return this->Path < other.Path || + (this->Path == other.Path && this->Prefix < other.Prefix); + } + }; + const std::vector<PathWithPrefix>& GetPaths() const { return this->Paths; } std::size_t size() const { return this->Paths.size(); } - void ExtractWithout(const std::set<std::string>& ignore, + void ExtractWithout(const std::set<std::string>& ignorePaths, + const std::set<std::string>& ignorePrefixes, std::vector<std::string>& outPaths, bool clear = false) const; @@ -47,8 +59,9 @@ public: const char* base = nullptr); protected: - void AddPathInternal(const std::string& path, const char* base = nullptr); + void AddPathInternal(const std::string& path, const std::string& prefix, + const char* base = nullptr); cmFindCommon* FC; - std::vector<std::string> Paths; + std::vector<PathWithPrefix> Paths; }; |
