Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CMake custom clean commands

Tags:

command

cmake

In my CMake project I'd like to have some custom behavior happen when the clean target is run. However, if I do

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.

like image 525
paleozogt Avatar asked Oct 13 '10 15:10

paleozogt


1 Answers

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

like image 184
RobertJMaynard Avatar answered Nov 09 '22 07:11

RobertJMaynard