[flac-dev] Build systems to keep
andy at warmcat.com
Mon May 2 08:58:39 UTC 2022
On May 2, 2022 9:14:56 AM GMT+01:00, Martijn van Beurden <mvanb1 at gmail.com> wrote:
>Op ma 2 mei 2022 om 06:50 schreef Andy Green <andy at warmcat.com>:
>> So I would suggest that making a new release dropping everything except
>> cmake is the best way to maintain this.
>I think there is no harm in maintaining two build systems, it's just
If the project is still growing, having to take care of aligning, testing, and supporting multiple distinct build systems is a real cost. If it's not going to change much nor acquire many new users, indeed maybe you can just not have to care.
>that four is a bit much. There's always one that's forgotten, usually
>the Makefile.lite or vcxproj files. I think having both CMake and
>autotools has its benefits. I personally like the ease of
>cross-compiling with the autotools build system, and make distcheck
>seems to have no equal in CMake. The autotools suite on the other hand
>can only create Makefiles.
Cmake approach for cross is to produce a 'toolchain file' which specifies a handful of crossplatform cmake commands to specify how to build cross... usually this is fixing the toolchain path, your cross-root path, and turning off search in build host dirs. This toolchain file is invariant for whatever you will build with it, invariant also by build platform, and replaces the cross tuples needed by autotools. If you have a bunch of things to build cross, it's more flexible, consistent and simple to give this toolchain file to your build host cmake and have it just work on every project you want to build the same, than figure out what different distributed configure scripts often created by different autotools eras want (not all projects agree on override host / build / target or some combination to trigger cross) or know about (eg, risc-v).
Like cmake has ctest, he also comes with CPack. This can produce packages of various types (tarball, deb, rpm etc) for distribution using installation info, and versions etc from CMakeLists.txt.
Finally by coincidence this is on hackernews today (from 2021)
... anyway, good luck whatever you choose to do about it.
More information about the flac-dev