ExternalProject 的 CMake 错误
两天前,我添加了一个外部项目来使用autotools编译一个项目。直到今天它都工作得很好......
我有一个奇怪的错误:
CMake 错误位于 /usr/share/cmake-2.8/Modules/ExternalProject.cmake:710(消息):错误:没有下载信息 对于“libantlr3c”——请指定现有的 SOURCE_DIR 或 URL、CVS_REPOSITORY 和 CVS_MODULE、SVN_REPOSITORY 或 DOWNLOAD_COMMAND 之一
并且实际上指定了这些规则之一(SOURCE_DIR):
cmake_minimum_required(VERSION 2.8)
# ...
include(ExternalProject)
ExternalProject_Add(
libantlr3c
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/libantlr3c-3.1.3
CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/lib/libantlr3c-3.1.3/configure --prefix=${CMAKE_CURRENT_SOURCE_DIR}/lib/libantlr3c-3.1.3
PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/lib/libantlr3c-3.1.3
BUILD_COMMAND make
BUILD_IN_SOURCE 1
)
所以这个错误没有任何意义...并且它工作得很好昨天(到目前为止没有任何改变)。
有什么想法吗?
谢谢你!
Two days ago, I added an External Project to compile a project using autotools. It was perfectly working until today...
I have a weird error:
CMake Error at
/usr/share/cmake-2.8/Modules/ExternalProject.cmake:710 (message): error: no download info
for 'libantlr3c' -- please specify existing SOURCE_DIR or one of URL, CVS_REPOSITORY and CVS_MODULE, SVN_REPOSITORY or DOWNLOAD_COMMAND
And one of these rules is actually specified (SOURCE_DIR):
cmake_minimum_required(VERSION 2.8)
# ...
include(ExternalProject)
ExternalProject_Add(
libantlr3c
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/libantlr3c-3.1.3
CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/lib/libantlr3c-3.1.3/configure --prefix=${CMAKE_CURRENT_SOURCE_DIR}/lib/libantlr3c-3.1.3
PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/lib/libantlr3c-3.1.3
BUILD_COMMAND make
BUILD_IN_SOURCE 1
)
So this error hasn't any meaning... And it was perfectly working yesterday (nothing changed until now).
Any idea ?
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是2.8.0版本的一个bug。安装版本 2.8.3 或更高版本...
This is a bug from the 2.8.0 version. Install the version 2.8.3 or superior...
即使使用 2.8.6,我也遇到了类似的问题,并且文档没有太大帮助。我在网上找到了一个例子,它给了我所需的提示。
您需要使用 URL 参数,但有一个问题。如果你只是给它目录的路径,它会假设你将它指向一个存档,而不是一个目录。您必须在路径前面加上“file://”,例如:
现在我只需要弄清楚(在我的项目上)为什么它在不查找时查找
-mkdir
不存在。I had a similar issue even with 2.8.6 and the documentation wasn't much help. I found an example online that gave me the hint I needed.
You need to use the URL argument, but there's a catch. If you just give it the path to the direcotry it assumes you're going to point it to an archive, not an directory. You have to prepend your path with "file://", for example:
Now I just have to figure out (on my project) why it's looking for
<project>-mkdir
when it doesn't exist.