Commit 7638c6ea authored by Brad King's avatar Brad King

Merge branch 'find_package-root-prefix-path-suffixes' into release-3.9

parents 6fba4ec0 80b905f8
......@@ -216,6 +216,8 @@ void cmFindBase::FillPackageRootPath()
paths.AddCMakePrefixPath(varName);
paths.AddEnvPrefixPath(varName);
}
paths.AddSuffixes(this->SearchPathSuffixes);
}
void cmFindBase::FillCMakeVariablePath()
......
......@@ -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.
......
......@@ -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();
......
......@@ -37,7 +37,9 @@ macro(RunPackageRootTest)
message("Foo_ROOT :${Foo_ROOT}")
message("ENV{Foo_ROOT} :$ENV{Foo_ROOT}")
message("FOO_TEST_FILE_FOO :${FOO_TEST_FILE_FOO}")
message("FOO_TEST_FILE_ZOT :${FOO_TEST_FILE_ZOT}")
message("FOO_TEST_PATH_FOO :${FOO_TEST_PATH_FOO}")
message("FOO_TEST_PATH_ZOT :${FOO_TEST_PATH_ZOT}")
message("FOO_TEST_PROG_FOO :${FOO_TEST_PROG_FOO}")
CleanUpPackageRootTest()
message("")
......@@ -57,8 +59,10 @@ macro(RunPackageRootTest)
message("FOO_TEST_PROG_FOO :${FOO_TEST_PROG_FOO}")
message("BAR_TEST_FILE_FOO :${BAR_TEST_FILE_FOO}")
message("BAR_TEST_FILE_BAR :${BAR_TEST_FILE_BAR}")
message("BAR_TEST_FILE_ZOT :${BAR_TEST_FILE_ZOT}")
message("BAR_TEST_PATH_FOO :${BAR_TEST_PATH_FOO}")
message("BAR_TEST_PATH_BAR :${BAR_TEST_PATH_BAR}")
message("BAR_TEST_PATH_ZOT :${BAR_TEST_PATH_ZOT}")
message("BAR_TEST_PROG_FOO :${BAR_TEST_PROG_FOO}")
message("BAR_TEST_PROG_BAR :${BAR_TEST_PROG_BAR}")
CleanUpPackageRootTest()
......
find_file(BAR_TEST_FILE_FOO foo.h)
find_file(BAR_TEST_FILE_BAR bar.h)
find_file(BAR_TEST_FILE_ZOT zot.h PATH_SUFFIXES zot)
find_path(BAR_TEST_PATH_FOO foo.h)
find_path(BAR_TEST_PATH_BAR bar.h)
find_path(BAR_TEST_PATH_ZOT zot.h PATH_SUFFIXES zot)
find_program(BAR_TEST_PROG_FOO foo.exe)
find_program(BAR_TEST_PROG_BAR bar.exe)
find_file(FOO_TEST_FILE_FOO foo.h)
find_file(FOO_TEST_FILE_ZOT zot.h PATH_SUFFIXES zot)
find_path(FOO_TEST_PATH_FOO foo.h)
find_path(FOO_TEST_PATH_ZOT zot.h PATH_SUFFIXES zot)
find_program(FOO_TEST_PROG_FOO foo.exe)
if ("Bar" IN_LIST Foo_FIND_COMPONENTS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment