From ba660bfd6903ac909815fd0d8204e7bf03197ce8 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Fri, 29 Sep 2017 09:58:56 +0100 Subject: [CMake] Add global clean target `clean_all`. Fixes #718. This target invokes the `clean` target but is also intended for use by other cleaning targets. The `clean_runtime` target is now declared as a dependency of `clean-all` so that the runtime is cleaned as well. --- runtime/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'runtime') diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt index c90cbda0..2a056d9f 100644 --- a/runtime/CMakeLists.txt +++ b/runtime/CMakeLists.txt @@ -115,13 +115,15 @@ ExternalProject_Add_Step(BuildKLEERuntimes RuntimeBuild ) # Target for cleaning the bitcode build system -# FIXME: Invoke `make clean` does not invoke this target. It's also weird -# that `ExternalProject` provides no way to do a clean. +# NOTE: Invoking `make clean` does not invoke this target. +# Instead the user needs to invoke the `clean_all` target. +# It's also weird that `ExternalProject` provides no way to do a clean. add_custom_target(clean_runtime COMMAND ${ENV_BINARY} MAKEFLAGS="" ${MAKE_BINARY} -f Makefile.cmake.bitcode clean WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" ${ADD_CUSTOM_COMMAND_USES_TERMINAL_ARG} ) +add_dependencies(clean_all clean_runtime) ############################################################################### # Runtime install -- cgit 1.4.1