cmFindCommonDebugState: adopt event writing logic

This lays the groundwork for `find_package` also using the same
triggering logic.
This commit is contained in:
Ben Boeckel
2025-04-09 15:21:45 +02:00
parent 716dfd3b1e
commit fdccb8846c
6 changed files with 105 additions and 36 deletions
+11 -1
View File
@@ -32,7 +32,9 @@ namespace std {
/* clang-format on */
#endif
class cmConfigureLog;
class cmExecutionStatus;
class cmMakefile;
class cmPackageState;
class cmSearchPath;
@@ -95,6 +97,9 @@ private:
void InheritOptions(cmFindPackageCommand* other);
bool IsFound() const override;
bool IsDefined() const override;
// Try to find a package, assuming most state has already been set up. This
// is used for recursive dependency solving, particularly when importing
// packages via CPS. Bypasses providers if argsForProvider is empty.
@@ -353,5 +358,10 @@ private:
void FoundAtImpl(std::string const& path, std::string regexName) override;
void FailedAtImpl(std::string const& path, std::string regexName) override;
cmFindPackageCommand const* const FindPackageCommand;
void WriteDebug() const override;
#ifndef CMAKE_BOOTSTRAP
void WriteEvent(cmConfigureLog& log, cmMakefile const& mf) const override;
#endif
// cmFindPackageCommand const* const FindPackageCommand;
};