find_package(): Debug re-rooting behavior

find_package()'s debug mode provides information about which
prefixes are searched, but not which roots are prepended to each
prefix. Display this information if debugging is enabled.
This commit is contained in:
Kyle Edwards
2024-08-02 16:18:44 -04:00
parent 289c30ad3a
commit f8264cf2ff
8 changed files with 102 additions and 6 deletions

View File

@@ -81,7 +81,8 @@ protected:
void InitializeSearchPathGroups();
/** Place a set of search paths under the search roots. */
void RerootPaths(std::vector<std::string>& paths);
void RerootPaths(std::vector<std::string>& paths,
std::string* debugBuffer = nullptr);
/** Get ignored paths from CMAKE_[SYSTEM_]IGNORE_PATH variables. */
void GetIgnoredPaths(std::vector<std::string>& ignore);
@@ -97,7 +98,8 @@ protected:
No,
Yes,
};
void ComputeFinalPaths(IgnorePaths ignorePaths);
void ComputeFinalPaths(IgnorePaths ignorePaths,
std::string* debugBuffer = nullptr);
/** Compute the current default root path mode. */
void SelectDefaultRootPathMode();