diff options
| author | Brad King <brad.king@kitware.com> | 2022-12-08 12:16:08 -0500 |
|---|---|---|
| committer | Brad King <brad.king@kitware.com> | 2022-12-16 10:12:25 -0500 |
| commit | 6c40e0b25ec8475d73779ffbaa63a4230aa5e28d (patch) | |
| tree | f79f163ec0573ee870b2c01eb1a547be3d0324bb /Source/cmConfigureLog.h | |
| parent | 048a02d5bb842c783fad03105bb60e44227765ad (diff) | |
| download | cmake-6c40e0b25ec8475d73779ffbaa63a4230aa5e28d.tar.gz | |
ConfigureLog: Version individual events instead of the whole log
In order to support multiple log versions without buffering the
entire log, move versioning to the level of individual events.
Multiple versions of an event may then be logged consecutively.
Issue: #23200
Diffstat (limited to 'Source/cmConfigureLog.h')
| -rw-r--r-- | Source/cmConfigureLog.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmConfigureLog.h b/Source/cmConfigureLog.h index a71fd0ca09..9caac6618c 100644 --- a/Source/cmConfigureLog.h +++ b/Source/cmConfigureLog.h @@ -19,9 +19,15 @@ class cmMakefile; class cmConfigureLog { public: - cmConfigureLog(std::string logDir); + /** Construct with the log directory and a sorted list of enabled log + versions. The latest log version will be enabled regardless. */ + cmConfigureLog(std::string logDir, std::vector<unsigned long> logVersions); ~cmConfigureLog(); + /** Return true if at least one of the log versions in the given sorted + list is enabled. */ + bool IsAnyLogVersionEnabled(std::vector<unsigned long> const& v) const; + void WriteBacktrace(cmMakefile const& mf); void EnsureInit(); @@ -49,6 +55,7 @@ public: private: std::string LogDir; + std::vector<unsigned long> LogVersions; cmsys::ofstream Stream; unsigned Indent = 0; bool Opened = false; |
