1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-16 22:37:30 +08:00

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.
This commit is contained in:
Michael Scott
2015-11-29 13:34:07 +00:00
committed by Brad King
parent e8974b62d7
commit aac633d5e5
8 changed files with 54 additions and 12 deletions

View File

@@ -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;
}