summaryrefslogtreecommitdiffstats
path: root/Source/cmFindCommon.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-09-23 18:27:25 (GMT)
committerBrad King <brad.king@kitware.com>2011-09-23 18:36:27 (GMT)
commitb0cd630521658ddf8f8547597ac9c24a725f20e7 (patch)
treecc2ab6061efa6653679263ffcda3cac7897f1820 /Source/cmFindCommon.cxx
parent8c280435dfd746a897f6ce6696ba27571f195424 (diff)
downloadCMake-b0cd630521658ddf8f8547597ac9c24a725f20e7.zip
CMake-b0cd630521658ddf8f8547597ac9c24a725f20e7.tar.gz
CMake-b0cd630521658ddf8f8547597ac9c24a725f20e7.tar.bz2
Refactor find_* command final path list computation
All find_* commands re-root the list of paths and then add trailing slashes. Factor this pair of calls out into a dedicated method. The new method would be the only caller to AddTrailingSlashes, so subsume that method into it.
Diffstat (limited to 'Source/cmFindCommon.cxx')
-rw-r--r--Source/cmFindCommon.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmFindCommon.cxx b/Source/cmFindCommon.cxx
index a05e337..b44864e 100644
--- a/Source/cmFindCommon.cxx
+++ b/Source/cmFindCommon.cxx
@@ -471,8 +471,13 @@ void cmFindCommon::AddPathInternal(std::string const& in_path,
}
//----------------------------------------------------------------------------
-void cmFindCommon::AddTrailingSlashes(std::vector<std::string>& paths)
+void cmFindCommon::ComputeFinalPaths()
{
+ std::vector<std::string>& paths = this->SearchPaths;
+
+ // Expand list of paths inside all search roots.
+ this->RerootPaths(paths);
+
// Add a trailing slash to all paths to aid the search process.
for(std::vector<std::string>::iterator i = paths.begin();
i != paths.end(); ++i)