mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-25 00:59:19 -06:00
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.
This commit is contained in:
@@ -43,7 +43,14 @@ bool cmMessageCommand
|
||||
}
|
||||
else if (*i == "AUTHOR_WARNING")
|
||||
{
|
||||
type = cmake::AUTHOR_WARNING;
|
||||
if (this->Makefile->IsOn("CMAKE_SUPPRESS_DEVELOPER_WARNINGS"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
type = cmake::AUTHOR_WARNING;
|
||||
}
|
||||
++i;
|
||||
}
|
||||
else if (*i == "STATUS")
|
||||
@@ -73,7 +80,8 @@ bool cmMessageCommand
|
||||
|
||||
if (type != cmake::MESSAGE)
|
||||
{
|
||||
this->Makefile->IssueMessage(type, message);
|
||||
// we've overriden the message type, above, so force IssueMessage to use it
|
||||
this->Makefile->IssueMessage(type, message, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user