summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-02-10 20:23:07 (GMT)
committerBrad King <brad.king@kitware.com>2022-02-10 21:30:10 (GMT)
commit38de1bef2d10270d5f1be1fef2760310571c4026 (patch)
treea00c50445fc14db6deee51e9d02b497c8ff8e985 /Source/cmMakefile.h
parentd634d203973086f32f6d26e636eb1c9cc1acc545 (diff)
downloadCMake-38de1bef2d10270d5f1be1fef2760310571c4026.zip
CMake-38de1bef2d10270d5f1be1fef2760310571c4026.tar.gz
CMake-38de1bef2d10270d5f1be1fef2760310571c4026.tar.bz2
find_package: Improve --debug-find-pkg= when using a find module
Extend the feature added by commit d7b18895bc (cmake: Add filtered debug-find options, 2021-12-07, v3.23.0-rc1~217^2) to enable debug output for `find_*` calls within a find module or cmake package configuration file. Fixes: #23211
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r--Source/cmMakefile.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 85988b8..f425697 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -931,6 +931,18 @@ public:
// searches
std::deque<std::vector<std::string>> FindPackageRootPathStack;
+ class DebugFindPkgRAII
+ {
+ cmMakefile* Makefile;
+ bool OldValue;
+
+ public:
+ DebugFindPkgRAII(cmMakefile* mf, std::string const& pkg);
+ ~DebugFindPkgRAII();
+ };
+
+ bool GetDebugFindPkgMode() const;
+
void MaybeWarnCMP0074(std::string const& pkg);
void MaybeWarnUninitialized(std::string const& variable,
const char* sourceFilename) const;
@@ -1104,6 +1116,8 @@ private:
std::vector<BT<GeneratorAction>> GeneratorActions;
bool GeneratorActionsInvoked = false;
+ bool DebugFindPkg = false;
+
bool CheckSystemVars;
bool CheckCMP0000;
std::set<std::string> WarnedCMP0074;