MSYS Makefiles: Drop outdated enforcement of archiver availability

Since this generator was added, it enforced availability of `CMAKE_AR`
during `enable_language`.  These days, the ABI detection and/or check
for a working compiler have already been run via `try_compile`, so if
the archiver is required but missing we will have already failed.  Drop
the early generator-specific enforcement that `CMAKE_AR` has been found.
It's needed only if the project actually creates an archive.
This commit is contained in:
Brad King
2026-08-07 08:23:22 -04:00
parent 60c1f7fe45
commit 0e883c5753

View File

@@ -45,13 +45,6 @@ void cmGlobalMSYSMakefileGenerator::EnableLanguage(
{
mf->AddDefinition("MSYS", "1");
this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional);
if (!mf->IsSet("CMAKE_AR") && !this->CMakeInstance->GetIsInTryCompile() &&
!(1 == l.size() && l[0] == "NONE"_s)) {
cmSystemTools::Error(
"CMAKE_AR was not found, please set to archive program. " +
mf->GetSafeDefinition("CMAKE_AR"));
}
}
cmDocumentationEntry cmGlobalMSYSMakefileGenerator::GetDocumentation()