【CMake】CMake ERROR:could not find git for clone of

在使用 CMake 构建VS2015项目时遇到一个错误提示:could not find git for clone of。

 

因为项目需要从GitHub导入运行库,但构建项目时提示未能找到这个库,而git上项目并没有问题。

ExternalProject_Add(
   GIT_REPOSITORY https://github.com/AAA.git 
)

 

经过试验,可以通过在系统中安装 git shell 来解决这个问题,下载地址:https://git-scm.com/download/win

 

至于错误原因可能和链接的安全协议有关。

posted @ 2017-09-20 14:21  esCharacter  阅读(11810)  评论(0编辑  收藏  举报