Hi, * Helmut Grohne <helmut@subdivi.de> [2023-03-06 13:12]:
A while later meson came along and when adding support for it, we actually created a "crossfile" (how meson calls it) and pass that. That option certainly is on the table. Another major difference here is that the tool that creates this crossfile currently is a script debcrossgen in the meson package and we can change this crossfile generator without touching debhelper. For cmake, we've essentially inlined this into Debian::Debhelper::Buildsystem::cmake, so whenever we need to change a cmake cross compilation flag, we need a debhelper upload, which is suboptimal.
Given that meson and cmake are also part of the toolchain build-essential set (just like debhelper), would it not be better to have a separate cross-toolchain-helper package that provides such generators for all supported build systems?
So yeah, I recognize that a toolchain file probably is the more common way of cross building cmake projects and maybe we should switch to that model.
I'd say that is a matter of personal preference. It is certainly more convenient for developers who need to invoke cmake manually, but in effect, it is not much different from the current "inline" approach. While we are on the subject, you may be interested to learn that cmake recently gained an new feature to inject variables and configure many aspects of the cmake build cycle via configuration file [1]. This might even be useful for debhelper in general. Cheers Timo [1] https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html -- ⢀⣴⠾⠻⢶⣦⠀ ╭────────────────────────────────────────────────────╮ ⣾⠁⢠⠒⠀⣿⡁ │ Timo Röhling │ ⢿⡄⠘⠷⠚⠋⠀ │ 9B03 EBB9 8300 DF97 C2B1 23BF CC8C 6BDD 1403 F4CA │ ⠈⠳⣄⠀⠀⠀⠀ ╰────────────────────────────────────────────────────╯
Attachment:
signature.asc
Description: PGP signature