Reputation: 295
I'm trying to create a custom target which should be used to cleaning out the output of my program. Is it possible to do something like this:
add_custom_target(
clean_output
file(REMOVE_RECURSE ${PROJECT_BINARY_DIR}/output)
)
Upvotes: 6
Views: 1248
Reputation: 13708
Try the following:
add_custom_target(
clean_output
COMMAND ${CMAKE_COMMAND} -E rm -rf "${PROJECT_BINARY_DIR}/output"
)
Upvotes: 8