summaryrefslogtreecommitdiff
path: root/Source/cmMessageCommand.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-09-17 18:54:34 +0200
committerStephen Kelly <steveire@gmail.com>2013-10-08 18:11:22 +0200
commit509c142a3f5ae4c1aa8dfcb4257c63a9e1edc270 (patch)
treea40f496e40a0d6175e5b6c553ab5c3c004a4bba8 /Source/cmMessageCommand.cxx
parent40c84683aafc9447a0e17d81a71d061efde84bdb (diff)
downloadcmake-509c142a3f5ae4c1aa8dfcb4257c63a9e1edc270.tar.gz
message: Add a DEPRECATION mode
By default, the message is not issued. If CMAKE_ERROR_DEPRECATED is on, the message is fatal. If CMAKE_WARN_DEPRECATED is on, the message is a warning.
Diffstat (limited to 'Source/cmMessageCommand.cxx')
-rw-r--r--Source/cmMessageCommand.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/cmMessageCommand.cxx b/Source/cmMessageCommand.cxx
index e1dbf349d1..d85e720b67 100644
--- a/Source/cmMessageCommand.cxx
+++ b/Source/cmMessageCommand.cxx
@@ -52,6 +52,23 @@ bool cmMessageCommand
status = true;
++i;
}
+ else if (*i == "DEPRECATION")
+ {
+ if (this->Makefile->IsOn("CMAKE_ERROR_DEPRECATED"))
+ {
+ fatal = true;
+ type = cmake::DEPRECATION_ERROR;
+ }
+ else if (this->Makefile->IsOn("CMAKE_WARN_DEPRECATED"))
+ {
+ type = cmake::DEPRECATION_WARNING;
+ }
+ else
+ {
+ return true;
+ }
+ ++i;
+ }
for(;i != args.end(); ++i)
{