From 0e883c57532dee9addb8505e26e8df3684df9476 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 7 Aug 2026 08:23:22 -0400 Subject: [PATCH] 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. --- Source/cmGlobalMSYSMakefileGenerator.cxx | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Source/cmGlobalMSYSMakefileGenerator.cxx b/Source/cmGlobalMSYSMakefileGenerator.cxx index a7641f7fe5..090acaddd4 100644 --- a/Source/cmGlobalMSYSMakefileGenerator.cxx +++ b/Source/cmGlobalMSYSMakefileGenerator.cxx @@ -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()