diff options
author | Chuck Atkins <chuck.atkins@kitware.com> | 2014-10-17 17:07:26 (GMT) |
---|---|---|
committer | Chuck Atkins <chuck.atkins@kitware.com> | 2014-11-12 13:21:46 (GMT) |
commit | 1abd7cd930022ba045c3c0cd34406cbe19db84d3 (patch) | |
tree | 9514de06c2c7c9a072991560597139357510063d /Source/cmSearchPath.h | |
parent | 2a9ac4bd83f7247539616545ef0772fea1f4a1fc (diff) | |
download | CMake-1abd7cd930022ba045c3c0cd34406cbe19db84d3.zip CMake-1abd7cd930022ba045c3c0cd34406cbe19db84d3.tar.gz CMake-1abd7cd930022ba045c3c0cd34406cbe19db84d3.tar.bz2 |
Use containers of labeled search paths instead of individual members
Manage classes of search paths in labeled containers. This removes the
need to have a seperate member variable for each type of search path, but
also allows path types to be grouped togethor in various different ways
and manipulated as subsets of the full set of search paths.
Diffstat (limited to 'Source/cmSearchPath.h')
-rw-r--r-- | Source/cmSearchPath.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Source/cmSearchPath.h b/Source/cmSearchPath.h index 88ef0ff..51a6149 100644 --- a/Source/cmSearchPath.h +++ b/Source/cmSearchPath.h @@ -17,7 +17,7 @@ class cmFindCommon; /** \class cmSearchPath - * \brief Base class for FIND_XXX implementations. + * \brief Container for encapsulating a set of search paths * * cmSearchPath is a container that encapsulates search path construction and * management @@ -25,10 +25,12 @@ class cmFindCommon; class cmSearchPath { public: - cmSearchPath(cmFindCommon* findCmd, const std::string& groupLabel); + // cmSearchPath must be initialized from a valid pointer. The only reason + // for teh default is to allow it to be easily used in stl containers. + // Attempting to initialize with a NULL value will fail an assertion + cmSearchPath(cmFindCommon* findCmd = 0); ~cmSearchPath(); - const std::string& GetLabel() const { return this->Label; } const std::vector<std::string>& GetPaths() const { return this->Paths; } void ExtractWithout(const std::set<std::string>& ignore, @@ -48,12 +50,7 @@ protected: const char *base = 0); void AddPathInternal(const std::string& path, const char *base = 0); - // Members collected from the calling find command - const std::string& FindName; - cmMakefile* const& Makefile; - std::set<std::string>& Emitted; - - std::string Label; + cmFindCommon *FC; std::vector<std::string> Paths; }; |