Currently hooks are run during the configure step.
This causes the following problems:
it is conceptionally wrong
hook artifacts are not rebuild after clean
it wastes time during initial configuration (run four times via CMakeDeterminateSystem.cmake, CMakeSystem.cmake, CMakeDeterminateCCompiler.cmake, and CMakeDeterminateCXXCompiler.cmake)
no idea how to run post hooks with that approach
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.
Currently hooks are run during the configure step.
This causes the following problems:
clean
CMakeDeterminateSystem.cmake
,CMakeSystem.cmake
,CMakeDeterminateCCompiler.cmake
, andCMakeDeterminateCXXCompiler.cmake
)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.