fix: Build authors.c before all locales.#365
Conversation
Parallel build is failing without this because the `*.pot` files require `config/authors.c`.
|
To reproduce this bug, from the root of gerbv, type: The output of the We can see that it is trying to build gerbv.pot before the authors.c has been created. This is a mistake. |
rampageservices
left a comment
There was a problem hiding this comment.
LGTM. The race is between the per-language targets and the generated custom target — add_dependencies(gerbv-translations generated) only orders generated before gerbv-translations itself, not before its children gerbv-translations-ja/gerbv-translations-ru, so in a parallel build xgettext can fire before authors.c exists.
Adding the dependency to each per-language target is the correct fix.
Nit (not blocking): the existing add_dependencies(${GETTEXT_TARGET} generated) on line 69 is now redundant since all children depend on generated and the parent depends on all children. Could be removed for clarity, but harmless either way.
cmake always confuses me so I just had the AI code up the fix. Seems to work! I'm finding these errors because I use libgerbv and not gerbv. Also, I am compiling for CI on Windows under msys2. These are probably uncommon platforms! So I'm getting these uncommon errors. |
Parallel build is failing without this because the
*.potfiles requireconfig/authors.c.