Add the tablegenned files to the `clean' target.
[oota-llvm.git] / cmake / modules / TableGen.cmake
index 73831199b13c84594c214ba61762b7b7ddf16300..9d67137bb42a3b08b9f2a342cb644146aafe5bba 100644 (file)
@@ -35,6 +35,11 @@ macro(tablegen ofn)
     DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp
     COMMENT ""
     )
+
+  # `make clean' must remove all those generated files:
+  set_property(DIRECTORY APPEND
+    PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${ofn}.tmp ${ofn})
+
   set(TABLEGEN_OUTPUT ${TABLEGEN_OUTPUT} ${CMAKE_CURRENT_BINARY_DIR}/${ofn})
   set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${ofn} 
     PROPERTIES GENERATED 1)