The following issue has been SUBMITTED. ====================================================================== http://www.cmake.org/Bug/view.php?id=14302 ====================================================================== Reported By: Jason Spiro Assigned To: ====================================================================== Project: CMake Issue ID: 14302 Category: CMake Reproducibility: N/A Severity: trivial Priority: normal Status: new ====================================================================== Date Submitted: 2013-07-19 07:04 EDT Last Modified: 2013-07-19 07:04 EDT ====================================================================== Summary: [PATCH] Find MinGW even if it came included with the Code::Blocks IDE and is installed inside the Code::Blocks directory Description: I 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 <jasonspi...@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") ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2013-07-19 07:04 Jason Spiro New Issue ====================================================================== -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers