|
|
@@ -4744,27 +4744,11 @@ std::string cmGeneratorTarget::CheckCMP0004(std::string const& item) const
|
|
|
}
|
|
|
if (lib != item) {
|
|
|
cmake* cm = this->LocalGenerator->GetCMakeInstance();
|
|
|
- switch (this->GetPolicyStatusCMP0004()) {
|
|
|
- case cmPolicies::WARN: {
|
|
|
- std::ostringstream w;
|
|
|
- w << cmPolicies::GetPolicyWarning(cmPolicies::CMP0004) << "\n"
|
|
|
- << "Target \"" << this->GetName() << "\" links to item \"" << item
|
|
|
- << "\" which has leading or trailing whitespace.";
|
|
|
- cm->IssueMessage(MessageType::AUTHOR_WARNING, w.str(),
|
|
|
- this->GetBacktrace());
|
|
|
- }
|
|
|
- CM_FALLTHROUGH;
|
|
|
- case cmPolicies::OLD:
|
|
|
- break;
|
|
|
- case cmPolicies::NEW: {
|
|
|
- std::ostringstream e;
|
|
|
- e << "Target \"" << this->GetName() << "\" links to item \"" << item
|
|
|
- << "\" which has leading or trailing whitespace. "
|
|
|
- << "This is now an error according to policy CMP0004.";
|
|
|
- cm->IssueMessage(MessageType::FATAL_ERROR, e.str(),
|
|
|
- this->GetBacktrace());
|
|
|
- } break;
|
|
|
- }
|
|
|
+ std::ostringstream e;
|
|
|
+ e << "Target \"" << this->GetName() << "\" links to item \"" << item
|
|
|
+ << "\" which has leading or trailing whitespace. "
|
|
|
+ << "This is now an error according to policy CMP0004.";
|
|
|
+ cm->IssueMessage(MessageType::FATAL_ERROR, e.str(), this->GetBacktrace());
|
|
|
}
|
|
|
return lib;
|
|
|
}
|