Skip to content

cmake: Exclude generated sources from translation#31899

Merged
fanquake merged 2 commits into
bitcoin:masterfrom
hebasto:250218-translate-target
Feb 19, 2025
Merged

cmake: Exclude generated sources from translation#31899
fanquake merged 2 commits into
bitcoin:masterfrom
hebasto:250218-translate-target

Conversation

@hebasto
Copy link
Copy Markdown
Member

@hebasto hebasto commented Feb 18, 2025

This PR fixes an error encountered when building the translate target:

$ gmake -j $(nproc) -C depends MULTIPROCESS=1
$ cmake -G "Unix Makefiles" --preset dev-mode --toolchain depends/x86_64-pc-linux-gnu/toolchain.cmake -DWITH_USDT=OFF
$ cmake --build build_dev_mode -t translate
gmake[3]: *** No rule to make target 'src/test/ipc_test.capnp.c++', needed by 'src/qt/CMakeFiles/translate'. Stop.
gmake[2]: *** [CMakeFiles/Makefile2:1646: src/qt/CMakeFiles/translate.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:1653: src/qt/CMakeFiles/translate.dir/rule] Error 2
gmake: *** [Makefile:699: translate] Error 2

The previous attempt to address this issue worked only with Ninja generators and has been reverted.

Essentially, this PR modifies the translate target so that it ignores generated sources rather than attempting to update them.

At present, multiprocess-specific sources do not contain any translatable strings. Nonetheless, it is prudent to maintain a general approach.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants