summaryrefslogtreecommitdiffstats
path: root/Source/cmake.h
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2022-06-24 13:44:12 (GMT)
committerAlexandru Croitor <alexandru.croitor@qt.io>2022-06-24 14:24:33 (GMT)
commit2b6ef864e0906480e2eab4ed90a273fa629aaa62 (patch)
treedffa317f3f423decf3c4239ed25cc16148189a6e /Source/cmake.h
parent68eece740a8c55e22a1e1e0c64e99576c7b0d73f (diff)
downloadCMake-2b6ef864e0906480e2eab4ed90a273fa629aaa62.zip
CMake-2b6ef864e0906480e2eab4ed90a273fa629aaa62.tar.gz
CMake-2b6ef864e0906480e2eab4ed90a273fa629aaa62.tar.bz2
Move LogLevel enum out of cmake.h header
Move LogLevel enum into the cmMessageType.h header in preparation for a new log level querying feature. Wrap the enum into a new Message namespace. Adjust all code usages.
Diffstat (limited to 'Source/cmake.h')
-rw-r--r--Source/cmake.h21
1 files changed, 4 insertions, 17 deletions
diff --git a/Source/cmake.h b/Source/cmake.h
index 3c6af17..9d3348d 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -119,19 +119,6 @@ public:
FIND_PACKAGE_MODE
};
- /** \brief Define log level constants. */
- enum LogLevel
- {
- LOG_UNDEFINED,
- LOG_ERROR,
- LOG_WARNING,
- LOG_NOTICE,
- LOG_STATUS,
- LOG_VERBOSE,
- LOG_DEBUG,
- LOG_TRACE
- };
-
/** \brief Define supported trace formats **/
enum TraceFormat
{
@@ -469,9 +456,9 @@ public:
bool WasLogLevelSetViaCLI() const { return this->LogLevelWasSetViaCLI; }
//! Get the selected log level for `message()` commands during the cmake run.
- LogLevel GetLogLevel() const { return this->MessageLogLevel; }
- void SetLogLevel(LogLevel level) { this->MessageLogLevel = level; }
- static LogLevel StringToLogLevel(const std::string& levelStr);
+ Message::LogLevel GetLogLevel() const { return this->MessageLogLevel; }
+ void SetLogLevel(Message::LogLevel level) { this->MessageLogLevel = level; }
+ static Message::LogLevel StringToLogLevel(const std::string& levelStr);
static TraceFormat StringToTraceFormat(const std::string& levelStr);
bool HasCheckInProgress() const
@@ -732,7 +719,7 @@ private:
std::set<std::string> DebugFindPkgs;
std::set<std::string> DebugFindVars;
- LogLevel MessageLogLevel = LogLevel::LOG_STATUS;
+ Message::LogLevel MessageLogLevel = Message::LogLevel::LOG_STATUS;
bool LogLevelWasSetViaCLI = false;
bool LogContext = false;