Add a CMake build alongside autotools - #606
Open
matejk wants to merge 4 commits into
Open
Conversation
matejk
force-pushed
the
feature/cmake-build
branch
2 times, most recently
from
June 17, 2026 20:50
87e81d7 to
5fe0f1c
Compare
matejk
force-pushed
the
feature/cmake-build
branch
from
July 3, 2026 22:01
5fe0f1c to
ccff08f
Compare
Contributor
Author
|
Done, cmake.yml now uses actions/checkout@v6. The version updates for the existing workflows moved to a separate PR, #622. |
Single source of truth for the autotools and CMake builds.
…stem Honor $GENRB/$PKGDATA and accept source and output directories; the one-argument form is unchanged.
CMake >= 3.18, libfuse 2 like autotools. ICU via CMake's ICU module instead of the removed icu-config; plugins are MODULE libraries named as ltfs.conf expects; ctest registers tests/t/*.sh by glob.
gnu11: the sources use GNU extensions.
matejk
force-pushed
the
feature/cmake-build
branch
2 times, most recently
from
August 17, 2026 20:28
b24c452 to
91f1ced
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a CMake build (>= 3.18) that coexists with the autotools build, plus CI updates. Rebased onto the v2.4.8.4 release on
main; 4 commits:AC_INITto a top-levelVERSIONfile read by both build systems, so there is a single source of truth. It tracks the release version (2.4.8.4), and the autotoolsPACKAGE_VERSIONstring is unchanged.messages/make_message_src.shaccepts optional source/output directories and honors$GENRB/$PKGDATA, so an out-of-source build can call it; the one-argument form keeps the historical behavior andmessages/Makefile.amis unchanged.Scope
Linux is fully wired: libltfs, the
ltfs/mkltfs/ltfsckexecutables, the sg/file/itdtimg tape backends, both I/O schedulers, both key managers. macOS additionally builds the iokit tape backend. The FreeBSD/NetBSD backends are skipped with a notice and remain autotools-only. The build targets libfuse 2, matching autotools; the FUSE 3 selection follows as a small extension once #603 merges.The CMake build compiles as C11 (
gnu11, since LTFS uses_GNU_SOURCE/asprintf); a commented-outC17line is provided for when the minimum supported toolchain is GCC 8+/Clang 7+.Notable differences from the autotools implementation:
icu-configtool that ICU removed in 2018 (ICU6xis set automatically for ICU >= 60); libxml2 usesfind_package(LibXml2); fuse/uuid/net-snmp use pkg-config imported targets.CRC_OPTIMIZErule are replaced by direct source paths and one SSE4.2-flagged OBJECT library.ltfs.confexpects (libtape-sg.soetc.), installed to<libdir>/ltfs.tests/t/*.shby glob via the shared harness, so the build works with or without the integration test suite (Add an integration test suite using the file tape backend #611) and picks up its tests automatically.Verification
Ubuntu VM: the CMake build and all 14 integration tests pass via ctest (with #611 merged alongside); the install tree matches autotools (bin, lib, plugins,
etc/ltfs.conf{,.local}, pkgconfig, man, headers);ltfs --versionreports the identical string; the autotools build andmake checkstay green. macOS 26 (arm64, macFUSE 5.2 SDK): the CMake build produces libltfs, the executables, and all plugins includinglibtape-iokit.so, as C11.Fixes #521.