diff options
author | Brad King <brad.king@kitware.com> | 2017-07-12 12:58:15 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-07-12 12:59:07 (GMT) |
commit | 083a5cad0e7ad238005e2236364590e0eb1fb2dd (patch) | |
tree | c759a9be609db9314533671bc1e10917f2b9033d /Source | |
parent | 702083384143c762b6cfcf936f81cc26321a62fd (diff) | |
parent | 80b905f8826cc8c281bdc9bfd600e22dcc759dbc (diff) | |
download | CMake-083a5cad0e7ad238005e2236364590e0eb1fb2dd.zip CMake-083a5cad0e7ad238005e2236364590e0eb1fb2dd.tar.gz CMake-083a5cad0e7ad238005e2236364590e0eb1fb2dd.tar.bz2 |
Merge topic 'find_package-root-prefix-path-suffixes'
80b905f8 find_*: Honor PATH_SUFFIXES in PackageName_ROOT paths
1ae1b880 cmFindCommon: Drop unused FilterPaths method
cca8454e cmFindCommon: Fix typo in PackageName_ROOT path label
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Chuck Atkins <chuck.atkins@kitware.com>
Merge-request: !1044
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmFindBase.cxx | 2 | ||||
-rw-r--r-- | Source/cmFindCommon.cxx | 14 | ||||
-rw-r--r-- | Source/cmFindCommon.h | 5 |
3 files changed, 3 insertions, 18 deletions
diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index 581c401..e378208 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -216,6 +216,8 @@ void cmFindBase::FillPackageRootPath() paths.AddCMakePrefixPath(varName); paths.AddEnvPrefixPath(varName); } + + paths.AddSuffixes(this->SearchPathSuffixes); } void cmFindBase::FillCMakeVariablePath() diff --git a/Source/cmFindCommon.cxx b/Source/cmFindCommon.cxx index 103e692..fd0e317 100644 --- a/Source/cmFindCommon.cxx +++ b/Source/cmFindCommon.cxx @@ -11,7 +11,7 @@ cmFindCommon::PathGroup cmFindCommon::PathGroup::All("ALL"); cmFindCommon::PathLabel cmFindCommon::PathLabel::PackageRoot( - "PacakgeName_ROOT"); + "PackageName_ROOT"); cmFindCommon::PathLabel cmFindCommon::PathLabel::CMake("CMAKE"); cmFindCommon::PathLabel cmFindCommon::PathLabel::CMakeEnvironment( "CMAKE_ENVIRONMENT"); @@ -231,18 +231,6 @@ void cmFindCommon::RerootPaths(std::vector<std::string>& paths) } } -void cmFindCommon::FilterPaths(const std::vector<std::string>& inPaths, - const std::set<std::string>& ignore, - std::vector<std::string>& outPaths) -{ - for (std::vector<std::string>::const_iterator i = inPaths.begin(); - i != inPaths.end(); ++i) { - if (ignore.count(*i) == 0) { - outPaths.push_back(*i); - } - } -} - void cmFindCommon::GetIgnoredPaths(std::vector<std::string>& ignore) { // null-terminated list of paths. diff --git a/Source/cmFindCommon.h b/Source/cmFindCommon.h index 2eed47b..7954267 100644 --- a/Source/cmFindCommon.h +++ b/Source/cmFindCommon.h @@ -81,11 +81,6 @@ protected: void GetIgnoredPaths(std::vector<std::string>& ignore); void GetIgnoredPaths(std::set<std::string>& ignore); - /** Remove paths in the ignore set from the supplied vector. */ - void FilterPaths(const std::vector<std::string>& inPaths, - const std::set<std::string>& ignore, - std::vector<std::string>& outPaths); - /** Compute final search path list (reroot + trailing slash). */ void ComputeFinalPaths(); |