fixing always-dirty ki18n_install(po)
Milian Wolff
mail at milianw.de
Sun Jan 22 15:24:13 GMT 2023
Hey all,
see https://bugs.kde.org/show_bug.cgi?id=460245 for some details.
Does anyone know how we could fix `ki18n_install(po)` to not mark the build
dir as always-dirty? It's pretty annoying to have to wait for multiple seconds
for the translations, even though nothing has changed at all.
The culprit is, as usual in such situations, the usage of `add_custom_target`:
```cmake
add_custom_target(pofiles-${pathmd5} ALL
...
add_custom_target(tsfiles-${pathmd5} ALL
```
Now, the issue is that `add_custom_target` cannot ever become clean, it is
inherently broken by design in that regard. Usually `add_custom_command` is
better for that reason, but that one has a different design deficiency: It
does not support the `ALL` dependency...
So, does anyone know how to resolve this catch-22?
I only see two solutions:
a) fix cmake upstream to allow `ALL` for `add_custom_command`
b) change the i18n macro to take a target, e.g.:
```
ki18n_install(po TARGET kdevelop)
```
Then if that is given, use `add_custom_command`, otherwise keep the always
dirty `add_custom_target` like before?
I would appreciate any input on that front,
thanks!
--
Milian Wolff
http://milianw.de
More information about the Kde-buildsystem
mailing list