CMake ERROR:could not find git for clone of xxx
2018-03-26 15:38
1151 查看
利用CMake编译源码,出现 CMake ERROR:could not find git for clone of ExternalProject_Discregrid.
之后查看项目目录下的CMakeLists.txt, 打开,发现:
(这些本来都是没有被注释过的,用来从repositories添加外部项目的,可能是没有翻墙的原因,此处虽然给出了GIT_REPOSITORY后面的git地址,CMake的时候仍然显示没有找到git)
【解决办法】:
将上面的那些注释掉,直接手动从GitHub上下载缺的库源码,之后改成本地的路径,如下:
注意,此处的${CMAKE_SOURCE_DIR}即为你项目所在的编译目录,下载的源码放在这个目录下的一个子目录就好,之后再后面补全路径,如上。
最后,这么改了之后,就成功生成了项目文件,虽然VS一编译还是一堆错,不过好在CMake还是成功了。
之后查看项目目录下的CMakeLists.txt, 打开,发现:
(这些本来都是没有被注释过的,用来从repositories添加外部项目的,可能是没有翻墙的原因,此处虽然给出了GIT_REPOSITORY后面的git地址,CMake的时候仍然显示没有找到git)
【解决办法】:
将上面的那些注释掉,直接手动从GitHub上下载缺的库源码,之后改成本地的路径,如下:
注意,此处的${CMAKE_SOURCE_DIR}即为你项目所在的编译目录,下载的源码放在这个目录下的一个子目录就好,之后再后面补全路径,如上。
最后,这么改了之后,就成功生成了项目文件,虽然VS一编译还是一堆错,不过好在CMake还是成功了。
相关文章推荐
- 关于JNI配置Error: Could not find class file for 'XXX'问题(MAC Andriod Studio)
- Could not find method android() for arguments on root project '项目名' of type org.gradle.api.Project.
- Could not find a price list in Ordered UOM xxx and Primary UOM of the item
- Doxygen: Could not open file xxx for writing - error 0x80070052
- Error: Could not find an installed version of Gradle either in Android Studio
- Could not find a price list in Ordered UOM xxx and Primary UOM of the item
- ORA-12520: TNS:listener could not find available handler for requested type of server
- iOS坑爹的could not find any information for class named xxx
- ButterKnife:“Error:Could not find method apt() for arguments ...”
- fisheye Error occurred during initialization of VM Could not reserve enough space for object heap 问题解决!
- Could not find method android() for arguments on root project '项目名' of type org.gradle.api.Project.
- Ant error: Could not find xml-commons-apis Java extension for this JVM解决方法
- Could not load file or assembly "xxx" or one of its dependencies. The system cannot find the file sp
- ant build Error occurred during initialization of VM Could not reserve enough space for object heap
- Qt for Android - Internal Error: Could not find .pro file
- AndroidStudio启动错误:Error occurred during initialization of VM Could not reserve enough space for ...
- Error occurred during initialization of VM Could not reserve enough space for 2097152KB object heap
- Error: Could not find an installed version of Gradle
- Error occurred during initialization of VM Could not reserve enough space for object heap
- 【Android】Error[*,*]Could not find method android() for arguments [……]