summaryrefslogtreecommitdiff
path: root/Source/cmMessageCommand.cxx
diff options
context:
space:
mode:
authorMichael Scott <michael.scott250@gmail.com>2015-11-29 13:34:07 +0000
committerBrad King <brad.king@kitware.com>2015-12-01 10:22:51 -0500
commitaac633d5e5765bb6b51e31364325ae7d916f021c (patch)
treee7cd3773e3936f6af088416645cb6cde7992fc2d /Source/cmMessageCommand.cxx
parente8974b62d7883adf100d4c6ad90a0fbf682aaa91 (diff)
downloadcmake-aac633d5e5765bb6b51e31364325ae7d916f021c.tar.gz
Explicitly enable deprecated warnings by default.
Explicitly enable deprecated warnings by default, via the cmake::GetSuppressDeprecatedWarnings method, which signals suppression is turned off unless the CMake variables are set as required. Add tests and update the documentation for the new functionality.
Diffstat (limited to 'Source/cmMessageCommand.cxx')
-rw-r--r--Source/cmMessageCommand.cxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/Source/cmMessageCommand.cxx b/Source/cmMessageCommand.cxx
index fd0345d0bb..8272eb09f1 100644
--- a/Source/cmMessageCommand.cxx
+++ b/Source/cmMessageCommand.cxx
@@ -66,13 +66,17 @@ bool cmMessageCommand
fatal = true;
type = cmake::DEPRECATION_ERROR;
}
- else if (this->Makefile->IsOn("CMAKE_WARN_DEPRECATED"))
- {
- type = cmake::DEPRECATION_WARNING;
- }
else
{
- return true;
+ if (this->Makefile->GetCMakeInstance()->GetSuppressDeprecatedWarnings(
+ this->Makefile))
+ {
+ return true;
+ }
+ else
+ {
+ type = cmake::DEPRECATION_WARNING;
+ }
}
++i;
}