hasselmm / cmake-toolchain-arduino-cli

A CMake toolchain for Arduino entirely based upon Arduino CLI
MIT License
1 stars 0 forks source link

Move hooks into regular build chain #6

Open hasselmm opened 1 month ago

hasselmm commented 1 month ago

Currently hooks are run during the configure step.

This causes the following problems:

Better plan: Setup custom commands that generate stamp files for each hook. These stamp files and all the build targets depend upon each other. Postlink hooks would be injected between the *.elf and the .bin target.

Ideally the script even runs CMake's GLOB_RECURSE after running hooks to properly update clean files.

hasselmm commented 1 month ago

Oh, the joy: The file {build.path}/sketch/requiredLibraries.cpp is needed at configure time already (#5), but it usually gets generated by hooks.