gpt4 book ai didi

linux - 将 autogen.sh 与 ExternalProject_Add 结合使用

转载 作者:IT王子 更新时间:2023-10-29 01:03:57 30 4
gpt4 key购买 nike

我尝试在 CMakeLists.txt 中设置 ExternalProject_Add,

为此我发现了这个问题:

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

但是我有一个问题,我不能调用CONFIGURE_COMMAND configure,因为我必须调用./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
)

关于linux - 将 autogen.sh 与 ExternalProject_Add 结合使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36506300/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com