Specifying Build-Dependency on Generated Headers #13107
-
I am maintaining a project where we compile an incoming data file of string-rows into a binary format using a custom encoder program. As part of that process, our translation layer has an option to output a generated header file for inclusion in the C source code. We've included the directory in which these headers are generated to our project's Is there a best practice beyond this for ensuring that this process always runs before any source-code files are passed to compilation? Or does meson automagically trace that dependency from the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Both.
If a target has multiple C files (only one of which uses the header) and also the generated header, the generated header must be built for the first time before any C sources are compiled. After that, regenerating the header will only rebuild the files that the depfile scanner actually reported as using the header. |
Beta Was this translation helpful? Give feedback.
Both.