View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014302CMakeCMakepublic2013-07-19 07:042013-12-02 08:51
ReporterJason Spiro 
Assigned ToBrad King 
PrioritynormalSeveritytrivialReproducibilityN/A
StatusclosedResolutionfixed 
PlatformOSWineOS Version1.4.1
Product VersionCMake 2.8.11.2 
Target VersionCMake 2.8.12Fixed in VersionCMake 2.8.12 
Summary0014302: [PATCH] Find MinGW even if it came included with the Code::Blocks IDE and is installed inside the Code::Blocks directory
DescriptionI installed MinGW not using the MinGW installer, but using the Code::Blocks IDE installer (http://prdownload.berlios.de/codeblocks/codeblocks-12.11mingw-setup.exe [^]). So my copy of MinGW isn't in "c:\MinGW". Instead, it's in "c:\Program Files\CodeBlocks\MinGW".

The problem is that, as shipped, CMake doesn't look there to find MinGW.

The following trivial patch enhances CMake on Windows so that it will check in the Code::Blocks directory while trying to find MinGW.


Signed-off-by: Jason Spiro <jasonspiro4@gmail.com>
---
 Modules/CMakeMinGWFindMake.cmake | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Modules/CMakeMinGWFindMake.cmake b/Modules/CMakeMinGWFindMake.cmake
index efba20a..9d289ee 100644
--- a/Modules/CMakeMinGWFindMake.cmake
+++ b/Modules/CMakeMinGWFindMake.cmake
@@ -14,7 +14,8 @@
 
 find_program(CMAKE_MAKE_PROGRAM mingw32-make.exe PATHS
   "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MinGW;InstallLocation]/bin"
- c:/MinGW/bin /MinGW/bin)
+ c:/MinGW/bin /MinGW/bin
+ "[HKEY_CURRENT_USER\\Software\\CodeBlocks;Path]/MinGW/bin")
 find_program(CMAKE_SH sh.exe )
 if(CMAKE_SH)
   message(FATAL_ERROR "sh.exe was found in your PATH, here:\n${CMAKE_SH}\nFor MinGW make to work correctly sh.exe must NOT be in your path.\nRun cmake from a shell that does not have sh.exe in your PATH.\nIf you want to use a UNIX shell, then use MSYS Makefiles.\n")
Tagsmingw, patch
Attached Files

 Relationships

  Notes
(0033573)
Brad King (manager)
2013-07-19 08:01

Applied, thanks!

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9cdc5e6b [^]
(0034651)
Robert Maynard (manager)
2013-12-02 08:51

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2013-07-19 07:04 Jason Spiro New Issue
2013-07-19 07:06 Jason Spiro Tag Attached: mingw
2013-07-19 07:06 Jason Spiro Tag Attached: patch
2013-07-19 08:01 Brad King Note Added: 0033573
2013-07-19 08:01 Brad King Assigned To => Brad King
2013-07-19 08:01 Brad King Status new => resolved
2013-07-19 08:01 Brad King Resolution open => fixed
2013-07-19 08:01 Brad King Fixed in Version => CMake 2.8.12
2013-07-19 08:01 Brad King Target Version => CMake 2.8.12
2013-12-02 08:51 Robert Maynard Note Added: 0034651
2013-12-02 08:51 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team