【发布时间】:2011-02-25 14:22:41
【问题描述】:
我正在尝试使用add_custom_command 在构建期间生成文件。该命令似乎从未运行过,所以我制作了这个测试文件。
cmake_minimum_required( VERSION 2.6 )
add_custom_command(
OUTPUT hello.txt
COMMAND touch hello.txt
DEPENDS hello.txt
)
我试过跑步:
cmake .
make
并且没有生成 hello.txt。我做错了什么?
【问题讨论】:
-
add_custom_target could 是 add_custom_command 的替代品
标签: cmake cmake-custom-command