From 4d11487a8662945932d1c8522c8aadd755eb07f3 Mon Sep 17 00:00:00 2001
From: dt <qtc-committer@nokia.com>
Date: Fri, 3 Jul 2009 19:06:00 +0200
Subject: [PATCH] Harcode that on windows the gcc toolchain defaults to make
 instead of mingw32-make.exe

---
 src/plugins/cmakeprojectmanager/cmakeproject.cpp | 4 ++++
 src/plugins/projectexplorer/toolchain.cpp        | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
index 670c2d57cfc..771a408040e 100644
--- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
@@ -127,7 +127,11 @@ void CMakeProject::updateToolChain(const QString &compiler)
     //qDebug()<<"CodeBlocks Compilername"<<compiler
     ProjectExplorer::ToolChain *newToolChain = 0;
     if (compiler == "gcc") {
+#ifdef Q_OS_WIN
+        newToolChain = ProjectExplorer::ToolChain::createMinGWToolChain("gcc", QString());
+#else
         newToolChain = ProjectExplorer::ToolChain::createGccToolChain("gcc");
+#endif
     } else if (compiler == "msvc8") {
         // TODO MSVC toolchain
         newToolChain = ProjectExplorer::ToolChain::createMSVCToolChain(value(activeBuildConfiguration(), "msvcVersion").toString(), false);
diff --git a/src/plugins/projectexplorer/toolchain.cpp b/src/plugins/projectexplorer/toolchain.cpp
index 1aa284121c1..81185859b5d 100644
--- a/src/plugins/projectexplorer/toolchain.cpp
+++ b/src/plugins/projectexplorer/toolchain.cpp
@@ -245,6 +245,8 @@ bool MinGWToolChain::equals(ToolChain *other) const
 void MinGWToolChain::addToEnvironment(ProjectExplorer::Environment &env)
 {
     //qDebug()<<"MinGWToolChain::addToEnvironment";
+    if (m_mingwPath.isEmpty())
+        return;
     QString binDir = m_mingwPath + "/bin";
     if (QFileInfo(binDir).exists())
         env.prependOrSetPath(binDir);
-- 
GitLab