summaryrefslogtreecommitdiffstats
path: root/Source/cmFindBase.h
diff options
context:
space:
mode:
authorChuck Atkins <chuck.atkins@kitware.com>2014-10-09 17:52:54 (GMT)
committerChuck Atkins <chuck.atkins@kitware.com>2014-11-11 18:39:51 (GMT)
commit32922840e7ea8a0536fec393352ede5b75087543 (patch)
tree0bc3a3b6307bb4998a322e99b0afc9023205100b /Source/cmFindBase.h
parentf476b41fd8a92c7784a84059f615fdf8155d687e (diff)
downloadCMake-32922840e7ea8a0536fec393352ede5b75087543.zip
CMake-32922840e7ea8a0536fec393352ede5b75087543.tar.gz
CMake-32922840e7ea8a0536fec393352ede5b75087543.tar.bz2
Refactor and seperate search path construction for find commands
Prior to this commit, the set of search paths to traverse for find commands was incrementally constructed. This change allows each group of paths, i.e. CMakeVariablePaths, UserHintsPaths, SystemEnvironmentPaths, etc. to be constructed and manipulated independently, and then all combined togethor.
Diffstat (limited to 'Source/cmFindBase.h')
-rw-r--r--Source/cmFindBase.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/Source/cmFindBase.h b/Source/cmFindBase.h
index 42d9bc1..14f22c2 100644
--- a/Source/cmFindBase.h
+++ b/Source/cmFindBase.h
@@ -34,7 +34,7 @@ public:
protected:
void PrintFindStuff();
void ExpandPaths();
- void AddPathSuffixes();
+ void AddPathSuffixes(std::vector<std::string>& paths);
// see if the VariableName is already set in the cache,
// also copy the documentation from the cache to VariableDocumentation
@@ -55,18 +55,20 @@ protected:
bool AlreadyInCacheWithoutMetaInfo;
private:
// Add pieces of the search.
- void AddCMakeEnvironmentPath();
- void AddCMakeVariablePath();
- void AddSystemEnvironmentPath();
- void AddCMakeSystemVariablePath();
- void AddUserHintsPath();
- void AddUserGuessPath();
+ void FillCMakeVariablePath();
+ void FillCMakeEnvironmentPath();
+ void FillUserHintsPath();
+ void FillSystemEnvironmentPath();
+ void FillCMakeSystemVariablePath();
+ void FillUserGuessPath();
// Helpers.
- void AddCMakePrefixPath(const std::string& variable);
- void AddEnvPrefixPath(const std::string& variable);
- void AddPrefixPaths(std::vector<std::string> const& in_paths,
- PathType pathType);
+ void AddCMakePrefixPath(const std::string& variable,
+ std::vector<std::string>& outPaths);
+ void AddEnvPrefixPath(const std::string& variable,
+ std::vector<std::string>& outPaths);
+ void AddPrefixPaths(std::vector<std::string> const& inPaths,
+ PathType pathType, std::vector<std::string>& outPaths);
};