cmake window下 sh.exe was found in your PATH, here

Posted 苍洱

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了cmake window下 sh.exe was found in your PATH, here相关的知识,希望对你有一定的参考价值。

在window下 mingw环境下 用 camke 编译Cpp程序

CMake Error at D:/Program Files/CMake/share/cmake-3.8/Modules/CMakeMinGWFindMake.cmake:12 (message):
  sh.exe was found in your PATH, here:

  C:/cygwin64/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:2 (project)

  解决方法:

在环境里面 系统环境变量 用户环境变量 PATH中

找 C:/cygwin64/bin 删除

关闭cmd 重新编译

window minw cmake 命令:

cmake -G   "MinGW Makefiles" ..

 

以上是关于cmake window下 sh.exe was found in your PATH, here的主要内容,如果未能解决你的问题,请参考以下文章

windows下git中sh.exe中文显示乱码问题解决

Windows XP上的Git sh.exe进程分叉问题,慢吗?

Windows下使用CMake进阶

Windows系统下安装 CMake

cmake:MSVC,GNU解决bigobj问题

使用 CMake 在面向 Linux 的 Windows 下跨平台构建