summaryrefslogtreecommitdiff
path: root/Source/cmSearchPath.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-03-15 13:22:07 -0400
committerBrad King <brad.king@kitware.com>2018-03-16 09:19:28 -0400
commiteb35d8884b4cf9f4f96482b1bf6017511fdcdda3 (patch)
tree2634d94df58551aa9b7c46586d0102e5176033a7 /Source/cmSearchPath.h
parent018946aaafc9ada6852d55cb8034faf0f4c1afbc (diff)
downloadcmake-eb35d8884b4cf9f4f96482b1bf6017511fdcdda3.tar.gz
find_package: Use PackageName_ROOT variables as search prefixes
This feature was originally added by commit v3.9.0-rc1~71^2~2 (find_*: Add a new PackageRoot search path group, 2017-05-03) and documented by commit v3.9.0-rc1~71^2 (find_*: Add docs for PackageRoot search path group, 2017-05-03). However, we had to disable the feature and remove the documentation in commit v3.9.1~2^2 (find_*: Disable the PACKAGE_ROOT search path group for CMake 3.9, 2017-08-08) due to breaking projects that used `PackageName_ROOT` variables themselves. Add policy `CMP0074` to restore the `PackageName_ROOT` variable behavior in a compatible way. Also revise the stack of root paths to store the paths themselves rather than the package names. This way the policy can be considered at the `find_package` call site instead of individual `find_` calls inside a find module. Co-Author: Chuck Atkins <chuck.atkins@kitware.com> Issue: #17144
Diffstat (limited to 'Source/cmSearchPath.h')
-rw-r--r--Source/cmSearchPath.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmSearchPath.h b/Source/cmSearchPath.h
index fd0c7c52ed..2a576ed59b 100644
--- a/Source/cmSearchPath.h
+++ b/Source/cmSearchPath.h
@@ -39,10 +39,10 @@ public:
void AddCMakePrefixPath(const std::string& variable);
void AddEnvPrefixPath(const std::string& variable, bool stripBin = false);
void AddSuffixes(const std::vector<std::string>& suffixes);
-
-protected:
void AddPrefixPaths(const std::vector<std::string>& paths,
const char* base = nullptr);
+
+protected:
void AddPathInternal(const std::string& path, const char* base = nullptr);
cmFindCommon* FC;