diff options
author | Phil Howard <github@gadgetoid.com> | 2025-08-12 11:51:53 +0100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2025-08-15 01:24:53 +1000 |
commit | 141f7d0c35516403c39ce6266be7c6fb4551ef6f (patch) | |
tree | 25ae75b892c61df6e39445bce061ff16f4542aea /py | |
parent | 0615d13963ba33650a5b2070368584c7aec9c9dd (diff) |
py/mkrules.cmake: Clean genhdr and frozen_mpy dirs.
CMake builds relied upon the parent Makefile removing the entire
build directory to successfully clean build artifacts.
py/mkrules.cmake: Add ADDITIONAL_CLEAN_FILES properties to ensure a
"make clean" from within the build directory removes
the genhdr and frozen_mpy directories.
Signed-off-by: Phil Howard <github@gadgetoid.com>
Diffstat (limited to 'py')
-rw-r--r-- | py/mkrules.cmake | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/py/mkrules.cmake b/py/mkrules.cmake index 27d8b24f6..e3d769cc5 100644 --- a/py/mkrules.cmake +++ b/py/mkrules.cmake @@ -100,6 +100,12 @@ if(MICROPY_ROM_TEXT_COMPRESSION) ) endif() +# Ensure genhdr directory is removed on clean + +set_property(TARGET ${MICROPY_TARGET} APPEND PROPERTY ADDITIONAL_CLEAN_FILES + "${MICROPY_GENHDR_DIR}" +) + # Command to force the build of another command # Generate mpversion.h @@ -244,6 +250,10 @@ add_custom_command( if(MICROPY_FROZEN_MANIFEST) set(MICROPY_FROZEN_CONTENT "${CMAKE_BINARY_DIR}/frozen_content.c") + set_property(TARGET ${MICROPY_TARGET} APPEND PROPERTY ADDITIONAL_CLEAN_FILES + "${CMAKE_BINARY_DIR}/frozen_mpy" + ) + target_sources(${MICROPY_TARGET} PRIVATE ${MICROPY_FROZEN_CONTENT} ) |