AddFileDependencies

3.20 版本已弃用:请不要在新代码中使用此模块。

而是使用 set_property() 命令直接添加到 OBJECT_DEPENDS 源文件属性中

set_property(SOURCE <source> APPEND PROPERTY OBJECT_DEPENDS <files>...)

在 CMake 项目中加载此模块,使用

include(AddFileDependencies)

命令

此模块提供以下命令

add_file_dependencies

为源文件添加依赖

add_file_dependencies(<source> <files>...)

此命令将给定的 <files> 添加到文件 <source> 的依赖项中。