cmMessenger.h 1003 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #ifndef cmMessenger_h
  4. #define cmMessenger_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include "cmListFileCache.h"
  7. #include "cmake.h"
  8. #include <string>
  9. class cmState;
  10. class cmMessenger
  11. {
  12. public:
  13. cmMessenger(cmState* state);
  14. void IssueMessage(
  15. cmake::MessageType t, std::string const& text,
  16. cmListFileBacktrace const& backtrace = cmListFileBacktrace()) const;
  17. void DisplayMessage(cmake::MessageType t, std::string const& text,
  18. cmListFileBacktrace const& backtrace) const;
  19. bool GetSuppressDevWarnings() const;
  20. bool GetSuppressDeprecatedWarnings() const;
  21. bool GetDevWarningsAsErrors() const;
  22. bool GetDeprecatedWarningsAsErrors() const;
  23. private:
  24. bool IsMessageTypeVisible(cmake::MessageType t) const;
  25. cmake::MessageType ConvertMessageType(cmake::MessageType t) const;
  26. cmState* State;
  27. };
  28. #endif