diff options
author | Brad King <brad.king@kitware.com> | 2017-07-11 13:20:37 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-07-11 13:20:37 (GMT) |
commit | 7638c6ea8de9029ac0dd1743a55a9e211fa53744 (patch) | |
tree | 7a64e21b61ab8ca4582edcfd166db7dd29e1513c /Source | |
parent | 6fba4ec0f55ffec4ee6939b3eca0eac47ca4a02f (diff) | |
parent | 80b905f8826cc8c281bdc9bfd600e22dcc759dbc (diff) | |
download | CMake-7638c6ea8de9029ac0dd1743a55a9e211fa53744.zip CMake-7638c6ea8de9029ac0dd1743a55a9e211fa53744.tar.gz CMake-7638c6ea8de9029ac0dd1743a55a9e211fa53744.tar.bz2 |
Merge branch 'find_package-root-prefix-path-suffixes' into release-3.9
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(); |