When using -G "MinGW Makefiles" I keep getting an error

---------------------------

CMake Error at 
C:/General/tools/unix/cmake/share/cmake-3.5/Modules/CMakeMinGWFindMake.cmake:22
(message):
  sh.exe was found in your PATH, here:

  C:/Program Files/Git/bin/sh.exe

  For MinGW make to work correctly sh.exe must NOT be in your path.

  Run cmake from a shell that does not have sh.exe in your PATH.

  If you want to use a UNIX shell, then use MSYS Makefiles.

Call Stack (most recent call first):
  CMakeLists.txt:8 (project)


CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

-------------------------

if I just re-run the cmake It completes fine and even compiles correctly.

It's getting sh because GIT uses it... and it's not something I can
really bypass, and I sometimes do NEED git in my path.

if I just edit the CmakeMinGWFIndMake.cmake file and comment out the
mesage box and make program override it also works just fine.

once upon a time ... maybe a decade ago sh.exe in the path caused
erorrs... but this sin't such an issue anymore. ( Since Mingw32-make
ignores -j # option?)

---------
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")

  #set(CMAKE_MAKE_PROGRAM NOTFOUND)

endif()
-------------
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to