summaryrefslogtreecommitdiffstats
path: root/Source/cmMessenger.h
diff options
context:
space:
mode:
authorBruno Manganelli <bruno.manga95@gmail.com>2018-11-22 00:49:50 (GMT)
committerCraig Scott <craig.scott@crascit.com>2019-01-01 00:55:08 (GMT)
commit8a803d784bf65d2c8556eb1e6b6134b878e89c79 (patch)
tree75b091d837b3eacdd7de3ec2b8e59d5cd71636d0 /Source/cmMessenger.h
parent99a224e3ee0b6a770c388313a7b32746a95514e8 (diff)
downloadCMake-8a803d784bf65d2c8556eb1e6b6134b878e89c79.zip
CMake-8a803d784bf65d2c8556eb1e6b6134b878e89c79.tar.gz
CMake-8a803d784bf65d2c8556eb1e6b6134b878e89c79.tar.bz2
cmMessenger: Decouple from cmState
Diffstat (limited to 'Source/cmMessenger.h')
-rw-r--r--Source/cmMessenger.h40
1 files changed, 31 insertions, 9 deletions
diff --git a/Source/cmMessenger.h b/Source/cmMessenger.h
index 4aafbd4..e947eaa 100644
--- a/Source/cmMessenger.h
+++ b/Source/cmMessenger.h
@@ -10,13 +10,9 @@
#include <string>
-class cmState;
-
class cmMessenger
{
public:
- cmMessenger(cmState* state);
-
void IssueMessage(
cmake::MessageType t, std::string const& text,
cmListFileBacktrace const& backtrace = cmListFileBacktrace()) const;
@@ -24,16 +20,42 @@ public:
void DisplayMessage(cmake::MessageType t, std::string const& text,
cmListFileBacktrace const& backtrace) const;
- bool GetSuppressDevWarnings() const;
- bool GetSuppressDeprecatedWarnings() const;
- bool GetDevWarningsAsErrors() const;
- bool GetDeprecatedWarningsAsErrors() const;
+ void SetSuppressDevWarnings(bool suppress)
+ {
+ this->SuppressDevWarnings = suppress;
+ }
+ void SetSuppressDeprecatedWarnings(bool suppress)
+ {
+ this->SuppressDeprecatedWarnings = suppress;
+ }
+ void SetDevWarningsAsErrors(bool error)
+ {
+ this->DevWarningsAsErrors = error;
+ }
+ void SetDeprecatedWarningsAsErrors(bool error)
+ {
+ this->DeprecatedWarningsAsErrors = error;
+ }
+
+ bool GetSuppressDevWarnings() const { return this->SuppressDevWarnings; }
+ bool GetSuppressDeprecatedWarnings() const
+ {
+ return this->SuppressDeprecatedWarnings;
+ }
+ bool GetDevWarningsAsErrors() const { return this->DevWarningsAsErrors; }
+ bool GetDeprecatedWarningsAsErrors() const
+ {
+ return this->DeprecatedWarningsAsErrors;
+ }
private:
bool IsMessageTypeVisible(cmake::MessageType t) const;
cmake::MessageType ConvertMessageType(cmake::MessageType t) const;
- cmState* State;
+ bool SuppressDevWarnings = false;
+ bool SuppressDeprecatedWarnings = false;
+ bool DevWarningsAsErrors = false;
+ bool DeprecatedWarningsAsErrors = false;
};
#endif