diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-05-03 08:08:50 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-05-03 08:08:50 (GMT) |
commit | 2c10494ab3194e792ad69825cbb55d6644270dd0 (patch) | |
tree | 7947b61e478e9cc5bded43bcb2a3595d5b7aa253 /Source/cmPolicies.cxx | |
parent | 48f9fd39ad1637815cd89c2a2f2a17e43c0d7f78 (diff) | |
download | CMake-2c10494ab3194e792ad69825cbb55d6644270dd0.zip CMake-2c10494ab3194e792ad69825cbb55d6644270dd0.tar.gz CMake-2c10494ab3194e792ad69825cbb55d6644270dd0.tar.bz2 |
cmPolicies: Remove runtime check for programming errors.
Diffstat (limited to 'Source/cmPolicies.cxx')
-rw-r--r-- | Source/cmPolicies.cxx | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index 0f1c27e..4b6ea5c 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -20,12 +20,6 @@ public: unsigned int patchVersionIntroduced, cmPolicies::PolicyStatus status) { - if (!idString || !shortDescription) - { - cmSystemTools::Error("Attempt to define a policy without " - "all parameters being specified!"); - return; - } this->ID = iD; this->IDString = idString; this->ShortDescription = shortDescription; @@ -405,14 +399,6 @@ void cmPolicies::DefinePolicy(cmPolicies::PolicyID iD, unsigned int patchVersionIntroduced, 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, shortDescription, majorVersionIntroduced, @@ -587,12 +573,6 @@ std::string cmPolicies::GetPolicyWarning(cmPolicies::PolicyID id) { std::map<cmPolicies::PolicyID,cmPolicy *>::iterator pos = 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; msg << @@ -611,12 +591,6 @@ std::string cmPolicies::GetRequiredPolicyError(cmPolicies::PolicyID id) { std::map<cmPolicies::PolicyID,cmPolicy *>::iterator pos = 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; error << |