cmPolicies: Remove runtime check for programming errors.
This commit is contained in:
parent
48f9fd39ad
commit
2c10494ab3
|
@ -20,12 +20,6 @@ public:
|
||||||
unsigned int patchVersionIntroduced,
|
unsigned int patchVersionIntroduced,
|
||||||
cmPolicies::PolicyStatus status)
|
cmPolicies::PolicyStatus status)
|
||||||
{
|
{
|
||||||
if (!idString || !shortDescription)
|
|
||||||
{
|
|
||||||
cmSystemTools::Error("Attempt to define a policy without "
|
|
||||||
"all parameters being specified!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this->ID = iD;
|
this->ID = iD;
|
||||||
this->IDString = idString;
|
this->IDString = idString;
|
||||||
this->ShortDescription = shortDescription;
|
this->ShortDescription = shortDescription;
|
||||||
|
@ -405,14 +399,6 @@ void cmPolicies::DefinePolicy(cmPolicies::PolicyID iD,
|
||||||
unsigned int patchVersionIntroduced,
|
unsigned int patchVersionIntroduced,
|
||||||
cmPolicies::PolicyStatus status)
|
cmPolicies::PolicyStatus status)
|
||||||
{
|
{
|
||||||
// a policy must be unique and can only be defined once
|
|
||||||
if (this->Policies.find(iD) != this->Policies.end())
|
|
||||||
{
|
|
||||||
cmSystemTools::Error("Attempt to redefine a CMake policy for policy "
|
|
||||||
"ID ", this->GetPolicyIDString(iD).c_str());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this->Policies[iD] = new cmPolicy(iD, idString,
|
this->Policies[iD] = new cmPolicy(iD, idString,
|
||||||
shortDescription,
|
shortDescription,
|
||||||
majorVersionIntroduced,
|
majorVersionIntroduced,
|
||||||
|
@ -587,12 +573,6 @@ std::string cmPolicies::GetPolicyWarning(cmPolicies::PolicyID id)
|
||||||
{
|
{
|
||||||
std::map<cmPolicies::PolicyID,cmPolicy *>::iterator pos =
|
std::map<cmPolicies::PolicyID,cmPolicy *>::iterator pos =
|
||||||
this->Policies.find(id);
|
this->Policies.find(id);
|
||||||
if (pos == this->Policies.end())
|
|
||||||
{
|
|
||||||
cmSystemTools::Error(
|
|
||||||
"Request for warning text for undefined policy!");
|
|
||||||
return "Request for warning text for undefined policy!";
|
|
||||||
}
|
|
||||||
|
|
||||||
std::ostringstream msg;
|
std::ostringstream msg;
|
||||||
msg <<
|
msg <<
|
||||||
|
@ -611,12 +591,6 @@ std::string cmPolicies::GetRequiredPolicyError(cmPolicies::PolicyID id)
|
||||||
{
|
{
|
||||||
std::map<cmPolicies::PolicyID,cmPolicy *>::iterator pos =
|
std::map<cmPolicies::PolicyID,cmPolicy *>::iterator pos =
|
||||||
this->Policies.find(id);
|
this->Policies.find(id);
|
||||||
if (pos == this->Policies.end())
|
|
||||||
{
|
|
||||||
cmSystemTools::Error(
|
|
||||||
"Request for error text for undefined policy!");
|
|
||||||
return "Request for error text for undefined policy!";
|
|
||||||
}
|
|
||||||
|
|
||||||
std::ostringstream error;
|
std::ostringstream error;
|
||||||
error <<
|
error <<
|
||||||
|
|
Loading…
Reference in New Issue