diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2019-12-27 15:52:47 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-12-27 15:53:13 (GMT) |
commit | bb811568cc099b19a98b146a4781bc27def5aef7 (patch) | |
tree | 0a1c17bd3c86cd6bd17c3eea5c2300b318bc21f2 /Source/cmake.h | |
parent | e8776d6e3ad2575d647d4b53dab65100c05a547e (diff) | |
parent | e113ab11681fa8c7b7b4ab2d8f4a093ef4230d5d (diff) | |
download | CMake-bb811568cc099b19a98b146a4781bc27def5aef7.zip CMake-bb811568cc099b19a98b146a4781bc27def5aef7.tar.gz CMake-bb811568cc099b19a98b146a4781bc27def5aef7.tar.bz2 |
Merge topic 'traceJSON'
e113ab1168 trace: Add test for the JSON-v1 trace
482497e0de trace: Add JSON output format
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4102
Diffstat (limited to 'Source/cmake.h')
-rw-r--r-- | Source/cmake.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Source/cmake.h b/Source/cmake.h index cb959ef..266d66c 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -113,6 +113,14 @@ public: LOG_TRACE }; + /** \brief Define supported trace formats **/ + enum TraceFormat + { + TRACE_UNDEFINED, + TRACE_HUMAN, + TRACE_JSON_V1, + }; + struct GeneratorInfo { std::string name; @@ -389,6 +397,7 @@ public: LogLevel GetLogLevel() const { return this->MessageLogLevel; } void SetLogLevel(LogLevel level) { this->MessageLogLevel = level; } static LogLevel StringToLogLevel(const std::string& levelStr); + static TraceFormat StringToTraceFormat(const std::string& levelStr); bool HasCheckInProgress() const { @@ -422,10 +431,12 @@ public: void SetDebugFindOutputOn(bool b) { this->DebugFindOutput = b; } //! Do we want trace output during the cmake run. - bool GetTrace() { return this->Trace; } + bool GetTrace() const { return this->Trace; } void SetTrace(bool b) { this->Trace = b; } - bool GetTraceExpand() { return this->TraceExpand; } + bool GetTraceExpand() const { return this->TraceExpand; } void SetTraceExpand(bool b) { this->TraceExpand = b; } + TraceFormat GetTraceFormat() const { return this->TraceFormatVar; } + void SetTraceFormat(TraceFormat f) { this->TraceFormatVar = f; } void AddTraceSource(std::string const& file) { this->TraceOnlyThisSources.push_back(file); @@ -436,6 +447,7 @@ public: } cmGeneratedFileStream& GetTraceFile() { return this->TraceFile; } void SetTraceFile(std::string const& file); + void PrintTraceFormatVersion(); bool GetWarnUninitialized() { return this->WarnUninitialized; } void SetWarnUninitialized(bool b) { this->WarnUninitialized = b; } @@ -584,6 +596,7 @@ private: bool DebugFindOutput = false; bool Trace = false; bool TraceExpand = false; + TraceFormat TraceFormatVar = TRACE_HUMAN; cmGeneratedFileStream TraceFile; bool WarnUninitialized = false; bool WarnUnused = false; |