summaryrefslogtreecommitdiffstats
path: root/Source/cmMessageCommand.cxx
diff options
context:
space:
mode:
authorMichael Scott <michael.scott250@gmail.com>2015-11-08 12:20:47 (GMT)
committerBrad King <brad.king@kitware.com>2015-11-30 20:00:08 (GMT)
commitdeec3a3f06d341cfe0bef4e856b263eff347cc72 (patch)
tree3eb1f0268a400ea4fd0573c6431825ecaa0b392c /Source/cmMessageCommand.cxx
parentaa427a4239eb691d4129ebc383ab7b0d61b5b94e (diff)
downloadCMake-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/cmMessageCommand.cxx')
-rw-r--r--Source/cmMessageCommand.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/cmMessageCommand.cxx b/Source/cmMessageCommand.cxx
index 2854a82..1c65ef7 100644
--- a/Source/cmMessageCommand.cxx
+++ b/Source/cmMessageCommand.cxx
@@ -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
{