diff options
author | Michael Scott <michael.scott250@gmail.com> | 2015-11-08 12:20:47 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-11-30 20:00:08 (GMT) |
commit | deec3a3f06d341cfe0bef4e856b263eff347cc72 (patch) | |
tree | 3eb1f0268a400ea4fd0573c6431825ecaa0b392c /Source/cmake.h | |
parent | aa427a4239eb691d4129ebc383ab7b0d61b5b94e (diff) | |
download | CMake-deec3a3f06d341cfe0bef4e856b263eff347cc72.zip CMake-deec3a3f06d341cfe0bef4e856b263eff347cc72.tar.gz CMake-deec3a3f06d341cfe0bef4e856b263eff347cc72.tar.bz2 |
Make message suppression more consistent.
Make the message suppression more consistent, by adding a check
for the message related CMake variables in cmake::IssueMessage,
which allows callers of IssueMessage other than the message
command to behave as expected. Also added a check for
CMAKE_SUPPRESS_DEVELOPER_WARNINGS in the message command to
mirror the deprecated message type behaviour.
Added a 'force' flag to the cmake::IssueMessage method, to
make the message suppression consistent, when setting the
message related CMake variables directly in a CMake file.
Expand message command tests to cover the AUTHOR_WARNING message
type as well.
Diffstat (limited to 'Source/cmake.h')
-rw-r--r-- | Source/cmake.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/cmake.h b/Source/cmake.h index c584ad9..0630daa 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -311,9 +311,11 @@ class cmake /** Display a message to the user. */ void IssueMessage(cmake::MessageType t, std::string const& text, - cmListFileBacktrace const& backtrace = cmListFileBacktrace()); + cmListFileBacktrace const& backtrace = cmListFileBacktrace(), + bool force = false); void IssueMessage(cmake::MessageType t, std::string const& text, - cmListFileContext const& lfc); + cmListFileContext const& lfc, + bool force = false); ///! run the --build option int Build(const std::string& dir, @@ -419,6 +421,12 @@ private: // Print a list of valid generators to stderr. void PrintGeneratorList(); + /* + * Check if messages of this type should be output, based on the state of the + * warning and error output CMake variables, in the cache. + */ + bool IsMessageTypeVisible(cmake::MessageType t); + bool PrintMessagePreamble(cmake::MessageType t, std::ostream& msg); }; |