From 55ba10dcfdfb1f69b81284810aa6f07dc1527ccb Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 26 May 2022 13:23:24 -0400 Subject: MSYS/MinGW Makefiles: Simplify selection of windres as Resource Compiler Since commit 957c2aac7f (RC: Simplify selection of resource compiler based on C/C++ toolchain, 2015-05-07, v3.3.0-rc1~101^2~3), `windres` is selected automatically when using compilers that target the GNU ABI. Drop the generator-specific preference to make behavior more consistent with the Ninja generator. Issue: #23542 --- Source/cmGlobalMSYSMakefileGenerator.cxx | 15 --------------- Source/cmGlobalMinGWMakefileGenerator.cxx | 19 ------------------- Source/cmGlobalMinGWMakefileGenerator.h | 7 ------- 3 files changed, 41 deletions(-) diff --git a/Source/cmGlobalMSYSMakefileGenerator.cxx b/Source/cmGlobalMSYSMakefileGenerator.cxx index cb63110..d4ff1e0 100644 --- a/Source/cmGlobalMSYSMakefileGenerator.cxx +++ b/Source/cmGlobalMSYSMakefileGenerator.cxx @@ -42,22 +42,7 @@ std::string cmGlobalMSYSMakefileGenerator::FindMinGW( void cmGlobalMSYSMakefileGenerator::EnableLanguage( std::vector const& l, cmMakefile* mf, bool optional) { - this->FindMakeProgram(mf); - const std::string& makeProgram = - mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM"); - std::vector locations; - std::string makeloc = cmSystemTools::GetProgramPath(makeProgram); - locations.push_back(this->FindMinGW(makeloc)); - locations.push_back(makeloc); - locations.push_back("/mingw/bin"); - locations.push_back("c:/mingw/bin"); - std::string trc = cmSystemTools::FindProgram("windres", locations); - std::string rc = "windres.exe"; - if (!trc.empty()) { - rc = trc; - } mf->AddDefinition("MSYS", "1"); - mf->AddDefinition("CMAKE_GENERATOR_RC", rc); this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional); if (!mf->IsSet("CMAKE_AR") && !this->CMakeInstance->GetIsInTryCompile() && diff --git a/Source/cmGlobalMinGWMakefileGenerator.cxx b/Source/cmGlobalMinGWMakefileGenerator.cxx index 781912f..5a7edae 100644 --- a/Source/cmGlobalMinGWMakefileGenerator.cxx +++ b/Source/cmGlobalMinGWMakefileGenerator.cxx @@ -19,25 +19,6 @@ cmGlobalMinGWMakefileGenerator::cmGlobalMinGWMakefileGenerator(cmake* cm) cm->GetState()->SetMinGWMake(true); } -void cmGlobalMinGWMakefileGenerator::EnableLanguage( - std::vector const& l, cmMakefile* mf, bool optional) -{ - this->FindMakeProgram(mf); - const std::string& makeProgram = - mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM"); - std::vector locations; - locations.push_back(cmSystemTools::GetProgramPath(makeProgram)); - locations.push_back("/mingw/bin"); - locations.push_back("c:/mingw/bin"); - std::string trc = cmSystemTools::FindProgram("windres", locations); - std::string rc = "windres.exe"; - if (!trc.empty()) { - rc = trc; - } - mf->AddDefinition("CMAKE_GENERATOR_RC", rc); - this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional); -} - void cmGlobalMinGWMakefileGenerator::GetDocumentation( cmDocumentationEntry& entry) { diff --git a/Source/cmGlobalMinGWMakefileGenerator.h b/Source/cmGlobalMinGWMakefileGenerator.h index 1574faf..92d495c 100644 --- a/Source/cmGlobalMinGWMakefileGenerator.h +++ b/Source/cmGlobalMinGWMakefileGenerator.h @@ -36,11 +36,4 @@ public: /** Get the documentation entry for this generator. */ static void GetDocumentation(cmDocumentationEntry& entry); - - /** - * Try to determine system information such as shared library - * extension, pthreads, byte order etc. - */ - virtual void EnableLanguage(std::vector const& languages, - cmMakefile*, bool optional); }; -- cgit v0.12