Summary: | ki18n_install(po) slows down each build, even if nothing has changed | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-ki18n | Reporter: | Igor Kushnir <igorkuo> |
Component: | general | Assignee: | Chusslove Illich <caslav.ilic> |
Status: | REPORTED --- | ||
Severity: | normal | CC: | kdelibs-bugs, mail |
Priority: | NOR | ||
Version: | 5.98.0 | ||
Target Milestone: | --- | ||
Platform: | Manjaro | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Igor Kushnir
2022-10-11 14:59:19 UTC
the issue is that it's using `add_custom_target` which is always dirty. in practice, `add_custom_target` should basically never be used imo - it would be much better to rewrite this to leverage `add_custom_command` instead, such that dependencies can be properly tracked. but that would require us to pass a target along to the macro that can be associated with the command - otherwise it would never be build. a pity that one cannot use `ALL` for `add_custom_command` :( very nasty, I wonder why no-one else complained about this yet :) (In reply to Milian Wolff from comment #1) > very nasty, I wonder why no-one else complained about this yet :) Maybe because the po files were committed to the main repositories only about two weeks ago. And the build slowdown of most projects is much less than 8 seconds. https://discourse.cmake.org/t/feature-request-add-custom-command-all/7609 Let's see what the cmake wizards have to say to this (In reply to Milian Wolff from comment #3) > https://discourse.cmake.org/t/feature-request-add-custom-command-all/7609 > > Let's see what the cmake wizards have to say to this The proposed solution is: > add_custom_command(OUTPUT file.txt COMMAND ${CMAKE_COMMAND} -E touch file.txt) > add_custom_target(tgt ALL DEPENDS file.txt) Questions: 1. Is it possible/how to enumerate all OUTPUT files in the CMake command? 2. Would the translations be updated after a *.po file is modified? |