cmDisallowedCommand: extract policy checking from cmCommand

Implement cmDisallowedCommand as a wrapper class for cmCommand.
This commit is contained in:
Daniel Pfeifer
2016-12-26 00:34:44 +01:00
parent 615e2a17e4
commit 7fb14775a3
14 changed files with 111 additions and 70 deletions

View File

@@ -16,11 +16,6 @@ class cmExecutionStatus;
bool cmUtilitySourceCommand::InitialPass(std::vector<std::string> const& args,
cmExecutionStatus&)
{
if (this->Disallowed(
cmPolicies::CMP0034,
"The utility_source command should not be called; see CMP0034.")) {
return true;
}
if (args.size() < 3) {
this->SetError("called with incorrect number of arguments");
return false;