diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-09-17 18:54:34 +0200 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-10-08 18:11:22 +0200 |
commit | 509c142a3f5ae4c1aa8dfcb4257c63a9e1edc270 (patch) | |
tree | a40f496e40a0d6175e5b6c553ab5c3c004a4bba8 /Source/cmMessageCommand.cxx | |
parent | 40c84683aafc9447a0e17d81a71d061efde84bdb (diff) | |
download | cmake-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.cxx | 17 |
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) { |