diff options
author | Brad King <brad.king@kitware.com> | 2022-02-10 20:23:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-02-10 21:30:10 (GMT) |
commit | 38de1bef2d10270d5f1be1fef2760310571c4026 (patch) | |
tree | a00c50445fc14db6deee51e9d02b497c8ff8e985 /Source/cmMakefile.cxx | |
parent | d634d203973086f32f6d26e636eb1c9cc1acc545 (diff) | |
download | CMake-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.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 68e61bb..94d3be6 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -4519,3 +4519,22 @@ cmMakefile::MacroPushPop::~MacroPushPop() { this->Makefile->PopMacroScope(this->ReportError); } + +cmMakefile::DebugFindPkgRAII::DebugFindPkgRAII(cmMakefile* mf, + std::string const& pkg) + : Makefile(mf) + , OldValue(this->Makefile->DebugFindPkg) +{ + this->Makefile->DebugFindPkg = + this->Makefile->GetCMakeInstance()->GetDebugFindPkgOutput(pkg); +} + +cmMakefile::DebugFindPkgRAII::~DebugFindPkgRAII() +{ + this->Makefile->DebugFindPkg = this->OldValue; +} + +bool cmMakefile::GetDebugFindPkgMode() const +{ + return this->DebugFindPkg; +} |