CMP0044: Remove support for OLD behavior

This commit is contained in:
Brad King
2024-12-04 14:12:55 -05:00
parent ed99370f63
commit 9094eaa778
20 changed files with 12 additions and 121 deletions

View File

@@ -1927,7 +1927,6 @@ struct CompilerIdNode : public cmGeneratorExpressionNode
static cmsys::RegularExpression compilerIdValidator("^[A-Za-z0-9_]*$");
for (auto const& param : parameters) {
if (!compilerIdValidator.find(param)) {
reportError(context, content->GetOriginalExpression(),
"Expression syntax not recognized.");
@@ -1937,22 +1936,6 @@ struct CompilerIdNode : public cmGeneratorExpressionNode
if (strcmp(param.c_str(), compilerId.c_str()) == 0) {
return "1";
}
if (cmsysString_strcasecmp(param.c_str(), compilerId.c_str()) == 0) {
switch (context->LG->GetPolicyStatus(cmPolicies::CMP0044)) {
case cmPolicies::WARN: {
context->LG->GetCMakeInstance()->IssueMessage(
MessageType::AUTHOR_WARNING,
cmPolicies::GetPolicyWarning(cmPolicies::CMP0044),
context->Backtrace);
CM_FALLTHROUGH;
}
case cmPolicies::OLD:
return "1";
case cmPolicies::NEW:
break;
}
}
}
return "0";
}