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:
parent
b1cfaf7b91
commit
51565abe79
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user