ENH: Improve error message when invalid policy is given.
This commit is contained in:
parent
870571b28b
commit
fb0296656d
@ -3333,8 +3333,9 @@ bool cmMakefile::SetPolicy(const char *id,
|
|||||||
cmPolicies::PolicyID pid;
|
cmPolicies::PolicyID pid;
|
||||||
if (!this->GetPolicies()->GetPolicyID(id, /* out */ pid))
|
if (!this->GetPolicies()->GetPolicyID(id, /* out */ pid))
|
||||||
{
|
{
|
||||||
cmSystemTools::Error("Invalid policy string used. Invalid string was "
|
cmOStringStream e;
|
||||||
, id);
|
e << "Policy \"" << id << "\" is not known to this version of CMake.";
|
||||||
|
this->IssueMessage(cmake::FATAL_ERROR, e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return this->SetPolicy(pid,status);
|
return this->SetPolicy(pid,status);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user