[cmake] cleaning_configure_file

add a wrapper to automatically add generated files to clean target
This commit is contained in:
akallabeth
2024-10-02 22:37:35 +02:00
parent c86a78bef7
commit cfc37caeb8
23 changed files with 67 additions and 44 deletions

View File

@@ -0,0 +1,14 @@
# Little helper that adds the generated file to the
# files to be cleaned in the current directory.
#
# Handy if the generated files might have changed
#
function(cleaning_configure_file SRC DST)
configure_file(${SRC} ${DST} ${ARGN})
set_property(
DIRECTORY
APPEND
PROPERTY ADDITIONAL_CLEAN_FILES ${DST}
)
endfunction()