mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-15 12:16:40 +08:00
cmMessageCommand: Remove extra layer of parentheses
The logic checking `CMAKE_WARN_DEPRECATED` contained an unnecessary layer of parentheses. The condition is of the form `!IsSet || IsOn` which is correct because the documentation says that the behavior is enabled unless the variable is explicitly set to a false value. Issue: #19610
This commit is contained in:
@@ -70,8 +70,8 @@ bool cmMessageCommand(std::vector<std::string> const& args,
|
||||
fatal = true;
|
||||
type = MessageType::DEPRECATION_ERROR;
|
||||
level = cmake::LogLevel::LOG_ERROR;
|
||||
} else if ((!status.GetMakefile().IsSet("CMAKE_WARN_DEPRECATED") ||
|
||||
status.GetMakefile().IsOn("CMAKE_WARN_DEPRECATED"))) {
|
||||
} else if (!status.GetMakefile().IsSet("CMAKE_WARN_DEPRECATED") ||
|
||||
status.GetMakefile().IsOn("CMAKE_WARN_DEPRECATED")) {
|
||||
type = MessageType::DEPRECATION_WARNING;
|
||||
level = cmake::LogLevel::LOG_WARNING;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user