diff options
author | Brad King <brad.king@kitware.com> | 2008-06-09 15:57:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-06-09 15:57:56 (GMT) |
commit | d53e5dec3748e1d800dae595dcb78f2c4d55f788 (patch) | |
tree | d53cc056e338a02277753caabfe5ae5bb7a41170 /Source/cmFindLibraryCommand.cxx | |
parent | 3446bab75eb9a686841ec9bf6683beac603cbde5 (diff) | |
download | CMake-d53e5dec3748e1d800dae595dcb78f2c4d55f788.zip CMake-d53e5dec3748e1d800dae595dcb78f2c4d55f788.tar.gz CMake-d53e5dec3748e1d800dae595dcb78f2c4d55f788.tar.bz2 |
ENH: In find_* implementation centralize addition of trailing slashes
- Create cmFindCommon::AddTrailingSlashes
- Use it in cmFindBase and cmFindPackageCommand
- Remove duplication from other find commands
Diffstat (limited to 'Source/cmFindLibraryCommand.cxx')
-rw-r--r-- | Source/cmFindLibraryCommand.cxx | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx index ab61401..2bf54b1 100644 --- a/Source/cmFindLibraryCommand.cxx +++ b/Source/cmFindLibraryCommand.cxx @@ -252,16 +252,6 @@ std::string cmFindLibraryCommand::FindLibrary(const char* name) } } - // Add a trailing slash to all paths to aid the search process. - for(std::vector<std::string>::iterator i = this->SearchPaths.begin(); - i != this->SearchPaths.end(); ++i) - { - std::string& p = *i; - if(p.empty() || p[p.size()-1] != '/') - { - p += "/"; - } - } std::string tryPath; for(std::vector<std::string>::const_iterator p = this->SearchPaths.begin(); p != this->SearchPaths.end(); ++p) |