开发者

CMake custom clean commands

开发者 https://www.devze.com 2023-01-20 07:14 出处:网络
In my CMake project I\'d like to have some custom behavior happen when the clean target is run.However, if I d开发者_高级运维o

In my CMake project I'd like to have some custom behavior happen when the clean target is run. However, if I d开发者_高级运维o

add_dependencies(clean extra-clean)

it fails with

add_dependencies Adding dependency to non-existent target: clean

Is it even possible to have custom clean behavior?

EDIT: I am running some external tools as part of the build. These tools generate lots of files, but they can be cleaned up simply by asking the tool to do so. Ideally, I could add a custom target to the clean target to call the tool to do its cleanup.


What is the custom behavior you are looking for? If you need to remove files you can use set_directory_properties.

0

精彩评论

暂无评论...
验证码 换一张
取 消