summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-05-27 13:09:17 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-05-27 13:09:23 (GMT)
commit6a2ee6f97795c5ae11b1b5dca9b8a0d8f5f4f8d7 (patch)
tree013105e790da13831cf64b9fce0457dd2f408a94 /Source
parent8ab866c64159d28aa161e4bf61b5ffad12d94ab8 (diff)
parent55ba10dcfdfb1f69b81284810aa6f07dc1527ccb (diff)
downloadCMake-6a2ee6f97795c5ae11b1b5dca9b8a0d8f5f4f8d7.zip
CMake-6a2ee6f97795c5ae11b1b5dca9b8a0d8f5f4f8d7.tar.gz
CMake-6a2ee6f97795c5ae11b1b5dca9b8a0d8f5f4f8d7.tar.bz2
Merge topic 'mingw-compiler-PATH'
55ba10dcfd MSYS/MinGW Makefiles: Simplify selection of windres as Resource Compiler 9019537670 MSYS/MinGW Makfiles: Select the compiler occurring first in PATH Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: مهدي شينون (Mehdi Chinoune) <mehdi.chinoune@hotmail.com> Merge-request: !7301
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalMSYSMakefileGenerator.cxx27
-rw-r--r--Source/cmGlobalMinGWMakefileGenerator.cxx31
-rw-r--r--Source/cmGlobalMinGWMakefileGenerator.h7
3 files changed, 0 insertions, 65 deletions
diff --git a/Source/cmGlobalMSYSMakefileGenerator.cxx b/Source/cmGlobalMSYSMakefileGenerator.cxx
index c8520b8..d4ff1e0 100644
--- a/Source/cmGlobalMSYSMakefileGenerator.cxx
+++ b/Source/cmGlobalMSYSMakefileGenerator.cxx
@@ -42,34 +42,7 @@ std::string cmGlobalMSYSMakefileGenerator::FindMinGW(
void cmGlobalMSYSMakefileGenerator::EnableLanguage(
std::vector<std::string> const& l, cmMakefile* mf, bool optional)
{
- this->FindMakeProgram(mf);
- const std::string& makeProgram =
- mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM");
- std::vector<std::string> 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 tgcc = cmSystemTools::FindProgram("gcc", locations);
- std::string gcc = "gcc.exe";
- if (!tgcc.empty()) {
- gcc = tgcc;
- }
- std::string tgxx = cmSystemTools::FindProgram("g++", locations);
- std::string gxx = "g++.exe";
- if (!tgxx.empty()) {
- gxx = tgxx;
- }
- 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_CC", gcc);
- mf->AddDefinition("CMAKE_GENERATOR_CXX", gxx);
- 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 54d048d..5a7edae 100644
--- a/Source/cmGlobalMinGWMakefileGenerator.cxx
+++ b/Source/cmGlobalMinGWMakefileGenerator.cxx
@@ -19,37 +19,6 @@ cmGlobalMinGWMakefileGenerator::cmGlobalMinGWMakefileGenerator(cmake* cm)
cm->GetState()->SetMinGWMake(true);
}
-void cmGlobalMinGWMakefileGenerator::EnableLanguage(
- std::vector<std::string> const& l, cmMakefile* mf, bool optional)
-{
- this->FindMakeProgram(mf);
- const std::string& makeProgram =
- mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM");
- std::vector<std::string> locations;
- locations.push_back(cmSystemTools::GetProgramPath(makeProgram));
- locations.push_back("/mingw/bin");
- locations.push_back("c:/mingw/bin");
- std::string tgcc = cmSystemTools::FindProgram("gcc", locations);
- std::string gcc = "gcc.exe";
- if (!tgcc.empty()) {
- gcc = tgcc;
- }
- std::string tgxx = cmSystemTools::FindProgram("g++", locations);
- std::string gxx = "g++.exe";
- if (!tgxx.empty()) {
- gxx = tgxx;
- }
- std::string trc = cmSystemTools::FindProgram("windres", locations);
- std::string rc = "windres.exe";
- if (!trc.empty()) {
- rc = trc;
- }
- mf->AddDefinition("CMAKE_GENERATOR_CC", gcc);
- mf->AddDefinition("CMAKE_GENERATOR_CXX", gxx);
- 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<std::string> const& languages,
- cmMakefile*, bool optional);
};