mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 13:20:47 -06:00
cmState: Add helper to represent removed commands
This commit is contained in:
@@ -472,6 +472,18 @@ void cmState::AddDisallowedCommand(std::string const& name,
|
||||
});
|
||||
}
|
||||
|
||||
void cmState::AddRemovedCommand(std::string const& name,
|
||||
std::string const& message)
|
||||
{
|
||||
this->AddBuiltinCommand(name,
|
||||
[message](std::vector<cmListFileArgument> const&,
|
||||
cmExecutionStatus& status) -> bool {
|
||||
status.GetMakefile().IssueMessage(
|
||||
MessageType::FATAL_ERROR, message);
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
void cmState::AddUnexpectedCommand(std::string const& name, const char* error)
|
||||
{
|
||||
this->AddBuiltinCommand(
|
||||
|
||||
@@ -183,6 +183,7 @@ public:
|
||||
void AddDisallowedCommand(std::string const& name, BuiltinCommand command,
|
||||
cmPolicies::PolicyID policy, const char* message,
|
||||
const char* additionalWarning = nullptr);
|
||||
void AddRemovedCommand(std::string const& name, std::string const& message);
|
||||
void AddUnexpectedCommand(std::string const& name, const char* error);
|
||||
void AddUnexpectedFlowControlCommand(std::string const& name,
|
||||
const char* error);
|
||||
|
||||
Reference in New Issue
Block a user