In the past I have dealt with code generators such as flex, bison, protobuf, etc…
In an old project, using makefiles, it was the same make that wrote a header file containing the semantic version string, and a couple of files containing arrays generated from binary files with the command xxd.
How is it possible to achieve this, with the right dependencies between files, with cmake?
For example if it is necessary to run a command every time the executable is built.
best regards
Max