summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.h
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2023-11-07 16:44:00 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2023-11-13 16:07:52 (GMT)
commitc6e6861e631ecfdc96c79f562a66021cb8971fcc (patch)
tree6cb0de03a6db5d0f997f5d351ac2a03bb060bff7 /Source/cmMakefile.h
parent2837f592ab7642e6a769949b4ddc1ffb37e21b9c (diff)
downloadCMake-c6e6861e631ecfdc96c79f562a66021cb8971fcc.zip
CMake-c6e6861e631ecfdc96c79f562a66021cb8971fcc.tar.gz
CMake-c6e6861e631ecfdc96c79f562a66021cb8971fcc.tar.bz2
install(EXPORT): Export find_dependency() calls
Issue: #20511 Co-Authored-by: Brad King <brad.king@kitware.com> Co-Authored-by: Robert Maynard <rmaynard@nvidia.com>
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r--Source/cmMakefile.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 24daa72..e5edbae 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -25,6 +25,7 @@
#include "cmAlgorithms.h"
#include "cmCustomCommand.h"
+#include "cmFindPackageStack.h"
#include "cmFunctionBlocker.h"
#include "cmListFileCache.h"
#include "cmMessageType.h" // IWYU pragma: keep
@@ -660,6 +661,11 @@ public:
cmListFileBacktrace GetBacktrace() const;
/**
+ * Get the current stack of find_package calls.
+ */
+ cmFindPackageStack GetFindPackageStack() const;
+
+ /**
* Get the vector of files created by this makefile
*/
const std::vector<std::string>& GetOutputFiles() const
@@ -1020,6 +1026,15 @@ public:
// searches
std::deque<std::vector<std::string>> FindPackageRootPathStack;
+ class FindPackageStackRAII
+ {
+ cmMakefile* Makefile;
+
+ public:
+ FindPackageStackRAII(cmMakefile* mf, std::string const& pkg);
+ ~FindPackageStackRAII();
+ };
+
class DebugFindPkgRAII
{
cmMakefile* Makefile;
@@ -1210,6 +1225,9 @@ private:
std::vector<BT<GeneratorAction>> GeneratorActions;
bool GeneratorActionsInvoked = false;
+ cmFindPackageStack FindPackageStack;
+ unsigned int FindPackageStackNextIndex = 0;
+
bool DebugFindPkg = false;
bool CheckSystemVars;