Merge branch 'backport-4.2-find_package-stack' into find_package-stack

This commit is contained in:
Brad King
2026-04-01 13:54:11 -04:00
12 changed files with 107 additions and 182 deletions
+15 -1
View File
@@ -1037,7 +1037,21 @@ public:
// searches
std::deque<std::vector<std::string>> FindPackageRootPathStack;
friend class cmFindPackageStackRAII;
/**
* RAII type to manage the find_package call stack.
*/
class FindPackageStackRAII
{
cmMakefile* Makefile;
public:
FindPackageStackRAII(cmMakefile* mf, std::string const& pkg,
std::shared_ptr<cmPackageInformation const> pkgInfo);
~FindPackageStackRAII();
FindPackageStackRAII(FindPackageStackRAII const&) = delete;
FindPackageStackRAII& operator=(FindPackageStackRAII const&) = delete;
};
class DebugFindPkgRAII
{