Skip to content

Commit 82ddcf0

Browse files
petitlapinbradking
authored andcommitted
MinGW Makefiles: do not fail if sh.exe is present in the path
The check was added only to fail early in an environment known not to work at the time: * https://web.archive.org/web/20120912010035/http://lists.trolltech.com/qt-interest/2006-01/thread00091-0.html Fixes: #19327
1 parent 60e7e5b commit 82ddcf0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Help/release/dev/mingw_no_sh.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
mingw-no-sh
2+
-----------
3+
4+
* The :generator:`MinGW Makefiles` generator no longer issues an error if
5+
``sh.exe`` is present in the environment's ``PATH``.

Modules/CMakeMinGWFindMake.cmake

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,5 @@ find_program(CMAKE_MAKE_PROGRAM mingw32-make.exe PATHS
77
c:/MinGW/bin /MinGW/bin
88
"[HKEY_CURRENT_USER\\Software\\CodeBlocks;Path]/MinGW/bin"
99
)
10-
find_program(CMAKE_SH sh.exe )
11-
if(CMAKE_SH)
12-
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")
13-
set(CMAKE_MAKE_PROGRAM NOTFOUND)
14-
endif()
1510

16-
mark_as_advanced(CMAKE_MAKE_PROGRAM CMAKE_SH)
11+
mark_as_advanced(CMAKE_MAKE_PROGRAM)

0 commit comments

Comments
 (0)