summaryrefslogtreecommitdiffstats
path: root/Source/cmFindPackageCommand.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/cmFindPackageCommand.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/cmFindPackageCommand.cxx')
-rw-r--r--Source/cmFindPackageCommand.cxx14
1 files changed, 1 insertions, 13 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 2e72b58..7d3f09b 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -1243,7 +1243,7 @@ void cmFindPackageCommand::ComputePrefixes()
this->AddPrefixesCMakeSystemVariable();
this->AddPrefixesSystemRegistry();
this->AddPrefixesUserGuess();
- this->ComputeFinalPrefixes();
+ this->ComputeFinalPaths();
}
//----------------------------------------------------------------------------
@@ -1574,18 +1574,6 @@ void cmFindPackageCommand::AddPrefixesUserHints()
}
//----------------------------------------------------------------------------
-void cmFindPackageCommand::ComputeFinalPrefixes()
-{
- std::vector<std::string>& prefixes = this->SearchPaths;
-
- // Construct the final set of prefixes.
- this->RerootPaths(prefixes);
-
- // Add a trailing slash to all prefixes to aid the search process.
- this->AddTrailingSlashes(prefixes);
-}
-
-//----------------------------------------------------------------------------
bool cmFindPackageCommand::SearchDirectory(std::string const& dir)
{
assert(!dir.empty() && dir[dir.size()-1] == '/');