加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

linux – 使用autogen.sh和ExternalProject_Add

发布时间:2020-12-13 23:52:25 所属栏目:Linux 来源:网络整理
导读:我尝试在CMakeLists.txt中设置ExternalProject_Add, 为此,我发现了这个问题: What is the correct usage of CMake EXTERNALPROJECT_ADD with a Git repository? 但我有一个问题,我不能调用CONFIGURE_COMMAND配置,因为我必须调用./autogen.sh来生成configure
我尝试在CMakeLists.txt中设置ExternalProject_Add,

为此,我发现了这个问题:

What is the correct usage of CMake EXTERNALPROJECT_ADD with a Git repository?

但我有一个问题,我不能调用CONFIGURE_COMMAND配置,因为我必须调用./autogen.sh来生成configure.ac.
我没有找到如何让cmake运行./autogen.sh

解决方法

从 documentation开始关于ExternalProject:

Any builtin step that specifies a <step>_COMMAND cmd... or custom step that specifies a COMMAND cmd... may specify additional command lines using the form COMMAND cmd.... At build time the commands will be executed in order and aborted if any one fails.

您可以指定在外部项目的配置步骤中执行的几个命令:

ExternalProject_Add(<some_project>
   ...
   CONFIGURE_COMMAND ./autogen.sh COMMAND ./configure
)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读