summaryrefslogtreecommitdiff
path: root/Source/cmMessageCommand.cxx
diff options
context:
space:
mode:
authorMichael Scott <michael.scott250@gmail.com>2015-07-28 00:07:03 +0100
committerBrad King <brad.king@kitware.com>2015-07-29 09:20:10 -0400
commitc96fe0b40d562b65831376f927b6fd96cf999a52 (patch)
tree7a72ca8450ded588ff6a0c7247de2366d178bfe5 /Source/cmMessageCommand.cxx
parent98d6e9ec2dd0a935b1ebfed50b6e9ecab719557d (diff)
downloadcmake-c96fe0b40d562b65831376f927b6fd96cf999a52.tar.gz
cmake: Add -W options to control deprecation warnings and errors
Refactor the -Wdev and -Wno-dev to use a generic -W parser that follows the GCC pattern. Include support for setting CMAKE_ERROR_DEPRECATED and CMAKE_WARN_DEPRECATED via the deprecated warning. Add -Werror=dev and -Wno-error=dev options so that dev warning options are in line with deprecated warning options. Use a new CMAKE_SUPPRESS_DEVELOPER_ERRORS internal cache entry to store the above new dev options persistently. Add tests for new options and updated cmake documentation and release notes to list new options.
Diffstat (limited to 'Source/cmMessageCommand.cxx')
-rw-r--r--Source/cmMessageCommand.cxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/Source/cmMessageCommand.cxx b/Source/cmMessageCommand.cxx
index 2854a82bd3..e09ba75c63 100644
--- a/Source/cmMessageCommand.cxx
+++ b/Source/cmMessageCommand.cxx
@@ -43,7 +43,19 @@ bool cmMessageCommand
}
else if (*i == "AUTHOR_WARNING")
{
- type = cmake::AUTHOR_WARNING;
+ if (!this->Makefile->IsOn("CMAKE_SUPPRESS_DEVELOPER_ERRORS"))
+ {
+ fatal = true;
+ type = cmake::AUTHOR_ERROR;
+ }
+ else if (!this->Makefile->IsOn("CMAKE_SUPPRESS_DEVELOPER_WARNINGS"))
+ {
+ type = cmake::AUTHOR_WARNING;
+ }
+ else
+ {
+ return true;
+ }
++i;
}
else if (*i == "STATUS")