diff options
author | Alex Turbov <i.zaufi@gmail.com> | 2019-08-12 22:25:07 (GMT) |
---|---|---|
committer | Alex Turbov <i.zaufi@gmail.com> | 2019-11-02 12:10:09 (GMT) |
commit | 949a1e120a3c2d9ecac08f7240a27d307fad503f (patch) | |
tree | 4f8733aa95cbedf6c038f2532bdd5fcd919e05be /Source/cmake.h | |
parent | 25eef45f16aa2046071d847d93314f3b843c870d (diff) | |
download | CMake-949a1e120a3c2d9ecac08f7240a27d307fad503f.zip CMake-949a1e120a3c2d9ecac08f7240a27d307fad503f.tar.gz CMake-949a1e120a3c2d9ecac08f7240a27d307fad503f.tar.bz2 |
message: New message types to mark checks performed by CMake
Closes #19638.
Co-Authored-By: Craig Scott <craig.scott@crascit.com>
Diffstat (limited to 'Source/cmake.h')
-rw-r--r-- | Source/cmake.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Source/cmake.h b/Source/cmake.h index c2f2cce..9e78436 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -5,12 +5,15 @@ #include "cmConfigure.h" // IWYU pragma: keep +#include <cstddef> #include <functional> #include <map> #include <memory> #include <set> +#include <stack> #include <string> #include <unordered_set> +#include <utility> #include <vector> #include "cmGeneratedFileStream.h" @@ -387,6 +390,25 @@ public: void SetLogLevel(LogLevel level) { this->MessageLogLevel = level; } static LogLevel StringToLogLevel(const std::string& levelStr); + bool HasCheckInProgress() const + { + return !this->CheckInProgressMessages.empty(); + } + std::size_t GetCheckInProgressSize() const + { + return this->CheckInProgressMessages.size(); + } + std::string GetTopCheckInProgressMessage() + { + auto message = this->CheckInProgressMessages.top(); + this->CheckInProgressMessages.pop(); + return message; + } + void PushCheckInProgressMessage(std::string message) + { + this->CheckInProgressMessages.emplace(std::move(message)); + } + //! Do we want debug output during the cmake run. bool GetDebugOutput() { return this->DebugOutput; } void SetDebugOutputOn(bool b) { this->DebugOutput = b; } @@ -596,6 +618,8 @@ private: bool LogLevelWasSetViaCLI = false; bool LogContext = false; + std::stack<std::string> CheckInProgressMessages; + void UpdateConversionPathTable(); //! Print a list of valid generators to stderr. |