Skip to content

Releases

Version 2.1.5

Choose a tag to compare

@StormBytePP StormBytePP released this 03 Nov 23:35

[Summary]

BuildMaster is a small CMake DSL for a graph of other people’s builds.
You declare each dependency once — how it is produced, what it waits on — and the parent gets one shared prefix instead of a pile of ExternalProject / FetchContent glue.
CMake and Meson trees are first-class.

Typical use: add the submodule, add_subdirectory, declare components, then depend / link.
Declaration order does not matter.
The public surface is ten commands on purpose; everything else is internal.

If you landed here from a release link and have not read the tree:

Fixed

  • Re-enabled components and restored build caches no longer mistake their own link metadata for another build's, preserving the install dependencies and selected static archives.
  • Reconfiguration removes disabled host dependencies from link metadata and does not apply stale bundled metadata to caller-provided targets.

Version 2.1.4

Choose a tag to compare

@StormBytePP StormBytePP released this 31 Oct 22:26

[Summary]

BuildMaster is a small CMake DSL for a graph of other people’s builds.
You declare each dependency once — how it is produced, what it waits on — and the parent gets one shared prefix instead of a pile of ExternalProject / FetchContent glue.
CMake and Meson trees are first-class.

Typical use: add the submodule, add_subdirectory, declare components, then depend / link.
Declaration order does not matter.
The public surface is ten commands on purpose; everything else is internal.

If you landed here from a release link and have not read the tree:

Fixed

  • Source-tree stamps preserve colons in Unix filenames, directories and symbolic-link targets. Path normalization no longer treats individual paths as search-path lists, fixing PulseAudio source hashing. The harness covers colon-named paths, digest invalidation, excluded build directories and symbolic links.
  • Clean builds and selectively deleted installed artifacts no longer leave CMake/Meson components on a false stamp hit. Build and install now have separate keys and artifact manifests: missing static archives, shared libraries (including versioned symlink targets), or installed headers trigger publication again without rebuilding intact nested products. Install targets validate on every build and declare their products as BYPRODUCTS, preserving consumer ordering with both Unix Makefiles and Ninja. A build-only request cannot certify an outdated installation; unchanged builds still skip the nested tools and installation.

Version 2.1.3

Choose a tag to compare

@StormBytePP StormBytePP released this 28 Oct 00:14

[Summary]

BuildMaster is a small CMake DSL for a graph of other people’s builds.
You declare each dependency once — how it is produced, what it waits on — and the parent gets one shared prefix instead of a pile of ExternalProject / FetchContent glue.
CMake and Meson trees are first-class.

Typical use: add the submodule, add_subdirectory, declare components, then depend / link.
Declaration order does not matter.
The public surface is ten commands on purpose; everything else is internal.

If you landed here from a release link and have not read the tree:

Fixed

  • Reconfiguring an outer host refreshes the generated toolchain instead of treating its cached bootstrap as a nested configure. Switching Debug to Release now reaches the actual nested CMake configuration, rather than only its cache. Nested hosts still reuse the outer bootstrap.
  • Refreshing unchanged parent/component toolchains, Meson native files and Apple compiler wrappers preserves their timestamps, avoiding unnecessary nested regeneration when migrating legacy stamps.
  • Meson defaults to b_ndebug=if-release, matching CMake's Release assertion policy. Explicit component options still override this default.
  • Component stamps include the BuildMaster version so an upgrade cannot reuse artifacts configured with the previous stage/toolchain behavior.

Version 2.1.2

Choose a tag to compare

@StormBytePP StormBytePP released this 19 Oct 09:39

[Summary]

BuildMaster is a small CMake DSL for a graph of other people’s builds.
You declare each dependency once — how it is produced, what it waits on — and the parent gets one shared prefix instead of a pile of ExternalProject / FetchContent glue.
CMake and Meson trees are first-class.

Typical use: add the submodule, add_subdirectory, declare components, then depend / link.
Declaration order does not matter.
The public surface is ten commands on purpose; everything else is internal.

If you landed here from a release link and have not read the tree:

Fixed

  • Meson on Apple Clang no longer feeds a one-shot clang file.c -o out -flto to the linker. Xcode 26 aborts that with LLVM ERROR: Unexistent dir: …/cc-*.o, so FFmpeg's bzip2 probe failed while b_lto was on. The native-file compiler is a wrapper that compiles with -c and then links, and only for that one-shot. The object stays where the source was, so a following static archive is still scanned. A normal -c build and the final link are unchanged, so LTO stays on.
  • Apple Clang's one-shot -flto wrapper now forwards -fprofile-generate and -fprofile-use to the link step as well as the compile. Those flags were classified with the other -f* options, so a Meson probe linked an instrumented static archive without the profile runtime and reported ___llvm_profile_instrument_target as a missing symbol. FFmpeg then treated libvpx as absent.

Version 2.1.1

Choose a tag to compare

@StormBytePP StormBytePP released this 17 Oct 17:51

[Summary]

BuildMaster is a small CMake DSL for a graph of other people’s builds.
You declare each dependency once — how it is produced, what it waits on — and the parent gets one shared prefix instead of a pile of ExternalProject / FetchContent glue.
CMake and Meson trees are first-class.

Typical use: add the submodule, add_subdirectory, declare components, then depend / link.
Declaration order does not matter.
The public surface is ten commands on purpose; everything else is internal.

If you landed here from a release link and have not read the tree:

Fixed

  • GIT PATCH applies once. git apply --reverse --check sees a series that is already in the worktree and skips it. A second configure of the same checkout (PGO training) no longer fails with "patch does not apply". The stamp path does the same for a single patch.

Version 2.1.0

Choose a tag to compare

@StormBytePP StormBytePP released this 16 Oct 18:13

[Summary]

BuildMaster is a small CMake DSL for a graph of other people’s builds.
You declare each dependency once — how it is produced, what it waits on — and the parent gets one shared prefix instead of a pile of ExternalProject / FetchContent glue.
CMake and Meson trees are first-class.

Typical use: add the submodule, add_subdirectory, declare components, then depend / link.
Declaration order does not matter.
The public surface is ten commands on purpose; everything else is internal.

If you landed here from a release link and have not read the tree:

Added

  • BACKEND=binary publishes a prebuilt archive into the shared prefix. The third argument of buildmaster_component is an http://, https:// or file:// URL. The filename is the cache key under <BUILDMASTER_DATADIR>/downloads; an existing file is a hit and there is no hash. The archive root is an install tree. Unpack extracts to a stage, copies every top-level entry except lib/ and lib64/, then include(GNUInstallDirs) and copies whichever of those two exists into that libdir. The script sets CMAKE_SYSTEM_NAME and the pointer size first, because cmake -P has neither and the module would warn. If both exist, the one already named for this machine wins, so a zip built with lib/ works on a lib64 host and the reverse. FILES= source trees are not rewritten. Mode is static or shared. Each produced spec becomes an IMPORTED library on the component id. On Windows the import library follows that libdir and the .dll stays in bin/. ALIAS= points at the id. buildmaster_group_add, buildmaster_depend and buildmaster_link accept the id. buildmaster_link puts the dest on the id's INTERFACE and makes <id>_install wait on that dest, so the dest archive is downloaded and extracted first. NOINSTALL, REPACK, WHOLE, FILES=, GIT=, SOURCE=, headers, executable and meta membership are FATAL. The fourth argument is ignored. Harness binary-backend builds two shared libraries, zips those prefixes, forces the opposite libdir, links and runs an executable that needs both, and checks that installing the upper id also extracts the lower one. The nested project links the file in that libdir by name (widget.lib or libwidget.so): find_library on Windows does not search lib64. Negative configures cover the FATAL flags.

Fixed

  • File-tool paths were never initialized. tools/file/init_vars.cmake was not included, so BUILDMASTER_TOOLS_FILE_SRCDIR was empty and a cached download looked for /templates/file_download.cmake.in. tools/file/helpers.cmake includes it. The same include exports the path into the toolchain.
  • Harness binary-backend finds widget_drive.exe on Windows. The driver is cmake -P, which does not set CMAKE_EXECUTABLE_SUFFIX. The consumer project writes the real executable path, and the driver runs that path.
  • Stamp tree hashing records symbolic links instead of following them. _bm_stamp_walk checks IS_SYMLINK before a directory or a regular file. The digest line is the relative path, the kind (symlink-file, symlink-directory or symlink-dangling) and the target text from file(READ_SYMLINK). The link is not opened and its target is not walked, so a directory link and a dangling link never reach file(SHA256). Retargeting a file link changes the digest even when both targets have the same bytes. A regular file is still relpath digest, so a tree with no links does not change key. Harness stamp-symlinks covers file links, directory links, dangling links and a changed target.
  • Nested CMake installs into this machine's libdir. The nested configure received the prefix but not CMAKE_INSTALL_LIBDIR. The child ran GNUInstallDirs on its own, so on Debian it installed into lib/ while BuildMaster renamed inside lib64/ after the harness forced that directory. The configure now passes -DCMAKE_INSTALL_LIBDIR. Meson already passed --libdir.

Version 2.0.4

Choose a tag to compare

@StormBytePP StormBytePP released this 13 Oct 04:44

[Summary]

BuildMaster is a small CMake DSL for a graph of other people’s builds.
You declare each dependency once — how it is produced, what it waits on — and the parent gets one shared prefix instead of a pile of ExternalProject / FetchContent glue.
CMake and Meson trees are first-class.

Typical use: add the submodule, add_subdirectory, declare components, then depend / link.
Declaration order does not matter.
The public surface is ten commands on purpose; everything else is internal.

If you landed here from a release link and have not read the tree:

Fixed

  • GIT accepts patch batches expanded from CMake lists. GIT={PATCH={${PATCHES}}} applies every list item in order, while following GIT sub-options remain separate.
  • Reused component skips identify their writer. When a nested configure reuses an existing links file, the status names the component that published it instead of repeating the skipped component's own title. Older links files without a recognizable writer use neutral reuse wording.
  • Component REPACK is idempotent across builds. The publisher archive is snapshotted after installation and never re-used as a merge input; component merges run from the install wrapper before its install stamp closes. Inputs, archiver/recipe and output bytes are stamped, so no-op builds skip the merge while changed members, missing outputs, and interrupted partial archives trigger a safe same-directory rebuild and atomic file(RENAME) publication.

Version 2.0.3

Choose a tag to compare

@StormBytePP StormBytePP released this 01 Oct 22:06

[Summary]

BuildMaster is a small CMake DSL for a graph of other people’s builds.
You declare each dependency once — how it is produced, what it waits on — and the parent gets one shared prefix instead of a pile of ExternalProject / FetchContent glue.
CMake and Meson trees are first-class.

Typical use: add the submodule, add_subdirectory, declare components, then depend / link.
Declaration order does not matter.
The public surface is ten commands on purpose; everything else is internal.

If you landed here from a release link and have not read the tree:

Changed

  • Minimum CMake raised from 3.20 to 3.21. Atomic downloads rely on file(RENAME … RESULT) to report a failed move; configuring with an older CMake now stops with a clear error.
  • BUILDMASTER_DATADIR replaces BUILDMASTER_DOWNLOADSDIR as the external setting. It names the directory for BuildMaster's own data (downloads, caches, …) and is read from -DBUILDMASTER_DATADIR=… first, then the BUILDMASTER_DATADIR environment variable, defaulting to BuildMaster's build directory. A relative path is taken from the top-level build directory; the directory is created if missing, and configure stops with a FATAL if it cannot be created or written. Downloads now live in <BUILDMASTER_DATADIR>/downloads (created if missing), which with the default is the same path as before. The BUILDMASTER_DOWNLOADSDIR environment variable is no longer read. Nested BuildMaster configures inherit the outermost value.

Fixed

  • Downloads are published atomically. FILES={…} archives were written straight into the downloads directory, so an interrupted or failed transfer could leave a truncated file that a later run (without EXPECTED_HASH) took as a cache hit, and two builds sharing the directory could write the same archive at once. Transfers now go to <BUILDMASTER_DATADIR>/tmp/<name>.part under a per-archive lock (<name>.lock) and are renamed into downloads/ only after they complete and pass the hash check. The cache check runs under the same lock, so a build waiting on another one's download reuses it.
  • Changing a component's mode or ABI on an existing build dir now reconfigures it. The stage stamp missed, but the nested configure only ran when the build tree was absent, so a component switched from static to shared (or built with different flags) kept its previous configure. Each nested tree now records the non-tree key it was configured with (bm-stamp.configured); a mismatch discards the nested CMake cache / Meson setup and configures again. The key now also covers the ABI inputs: C++ compiler, C/C++ flags (including per-build-type), linker flags, linker, MSVC runtime, C/C++ standard, sysroot and macOS architectures/deployment target. Build trees from earlier versions reconfigure once.
  • buildmaster_link(<host>, <ALIAS>) lost the library when the dest was reused from links/<id>.cmake. A component skipped as "already built by" another process got its ALIAS targets from the links file, but not BuildMaster's alias table, so the edge was stored against the alias and flatten looked for links/<alias>.cmake: no -L, no -l<stem> / <stem>.lib. Linux accepted the shared library with undefined symbols; macOS (two-level namespace) and Windows failed the link. The reused file's aliases are now registered for that id (read with file(READ), so a file written by another BuildMaster version works too); an alias that already maps to another id is FATAL. Alias resolution also follows a CMake ALIAS whose target is an IMPORTED links stub. The edge, the host link line and links/<host>.cmake now carry the raw id. Fixture links-reuse-alias: a nested SHARED host linked with --no-undefined / -undefined,error to the alias of a reused id; negative alias-reuse-conflict.

Version 2.0.2

Choose a tag to compare

@StormBytePP StormBytePP released this 29 Sep 20:16

[Summary]

BuildMaster is a small CMake DSL for a graph of other people’s builds.
You declare each dependency once — how it is produced, what it waits on — and the parent gets one shared prefix instead of a pile of ExternalProject / FetchContent glue.
CMake and Meson trees are first-class.

Typical use: add the submodule, add_subdirectory, declare components, then depend / link.
Declaration order does not matter.
The public surface is ten commands on purpose; everything else is internal.

If you landed here from a release link and have not read the tree:

Added

  • Static link sidecar. write_one always emits links/<id>_static.txt (set(_BM_STATIC_LINK …)). MODE=static fills it with LINK= tokens and buildmaster_link dest ids; shared / headers / executable write an empty list. Flatten reads the sidecar if it exists: dest ids with a links/<dest>.cmake are walked (-L + produced names); raw tokens (m, -framework CoreFoundation) go onto the host as-is. A shared .so still absorbs PRIVATE deps; consumers of that DSO see an empty sidecar and do not inherit pq / SDK libs. Effective nested reconfigure (stamp miss and a real cmake -S) deletes links/<id>.cmake and links/<id>_static.txt before rewrite; stamp / reuse skip leaves them. Fixture links-static-closure: static sl-db PRIVATE-links sl-pq, the parent exe links only sl-db, both archives appear on the line.
  • In-process CMake host backend (BACKEND=host). buildmaster_component accepts a source-file list and immediately creates a real STATIC or SHARED target for ordinary CMake properties and options. BuildMaster graph links are applied after all components materialize; LINK= is PUBLIC for static targets and PRIVATE for shared ones, so system libraries and component dependencies can reach final consumers without using REPACK as a workaround. REPACK remains for intentionally merging NOINSTALL static members. Fixture host-crypto-chain covers the host target and deferred dependency chain.

Fixed

  • A reconfigure no longer skips the ids its own build dir published. When ninja re-ran CMake inside a nested project (a CONFIGURE_DEPENDS glob mismatch, or a links/*.cmake rewritten by the parent), buildmaster_component treated the leftover links/<id>.cmake of every dependency that same project had configured as "already built by" another process. Their <id>_build / <id>_install stages vanished from the nested graph and a BACKEND=host library compiled before its dependencies were installed (missing headers). A top-level cmake <builddir> hit the same skip. Each build dir now records the ids it published in bm-owned-links.txt, and a reconfigure configures those again. Fixture host-nested-reconfigure drives configure → build → build → forced nested reconfigure → top-level reconfigure.
  • A parent no longer rewrites the links file its nested project wrote for the same id. When a cmake component's nested BuildMaster project declares that same id (for example with BACKEND=host), both processes wrote links/<id>.cmake with different content. The parent rewrite made the nested build.ninja stale, and the next build re-ran CMake in the nested project and then in the parent. Links files now record their writer's binary dir (_BM_LINKS_WRITER); the parent keeps a file written from the component's own build dir unless it adds dests.
  • List values in the toolchain dump stay on one line. _bm_tc_export / _bm_tc_export_raw stored each line in a CMake list property, so a value containing ; (for example BUILDMASTER_KNOWN_TOOLCHAINS) was split into one line per item. Nested configures then cached a multi-line value and warned Value of BUILDMASTER_KNOWN_TOOLCHAINS contained a newline; truncating. Semicolons are now escaped in the property and the dump writes set(X "a;b").

Version 2.0.1

Choose a tag to compare

@StormBytePP StormBytePP released this 27 Sep 00:00

[Summary]

BuildMaster is a small CMake DSL for a graph of other people’s builds.
You declare each dependency once — how it is produced, what it waits on — and the parent gets one shared prefix instead of a pile of ExternalProject / FetchContent glue.
CMake and Meson trees are first-class.

Typical use: add the submodule, add_subdirectory, declare components, then depend / link.
Declaration order does not matter.
The public surface is ten commands on purpose; everything else is internal.

If you landed here from a release link and have not read the tree:

Fixed

  • Nested project() no longer stacks bm/<id> under the child's -B. Component build dirs stay ${BUILDMASTER_BINDIR}/bm/<id> of the outermost consumer, so Windows CMAKE_OBJECT_PATH_MAX (250) is not blown by Suite BUNDLED graphs (Crypto → Buffer → Logger → String → Base).
  • Windows env runner Add-Type dumped SOURCE_CODE_ERROR under MSVC LIB. Enable-BmAnsiConsole compiled the VT P/Invoke while the process still had the parent job LIB/INCLUDE/LIBPATH (invalid SDK fragments such as 10.0.26100.0//x64). PowerShell 5.1 treats those as compiler errors. The variables are cleared only around Add-Type and restored after, in both runner_windows.ps1.in and runner_windows_silent.ps1.in. Nested LIB prepend for the real compile is unchanged.
  • Nested -G Ninja used a ghost CMAKE_MAKE_PROGRAM. The ninja tool already exported NINJA_EXECUTABLE on the component toolchain. It did not export CMAKE_MAKE_PROGRAM, so a child CMake (including a clang-cl leaf under an msvc parent) ran C:/ProgramData/chocolatey/bin/ninja.exe --version and died when that path was missing. When the ninja tool is loaded, update_toolchain.cmake now also exports CMAKE_MAKE_PROGRAM to the same binary. If the tool was not requested, nothing is written.
  • A later build re-entered the leaf on the unpatched tree. Configure, build and install now hash the component srcdir with CMake only (file(SHA256) per file, string(SHA256) of the sorted paths). No sha256sum and no cat. The other half of the key is options, toolchain, CMAKE_BUILD_TYPE, IPO, mode, produced and host OS/arch, stored in bm-stamp.extra. bm-stamp.key is created when install finishes and refreshed when a later build actually recompiles, and is the file a later install cache will read. A match skips nested cmake/meson and does not touch the prefix. A miss runs that stage. GIT={PATCH} is applied before the hash and the git root is reset when the last live holder finishes, including on a hit, so a later make may re-apply and re-hash. The hit still does not parse upstream CMakeLists.txt. Fixture stamp-patch: upstream cmake_minimum_required(VERSION 99.0), the patch lowers it to 3.20, the second stamp-leaf_install is a stamp hit and the worktree is back on 99.0.
  • buildmaster_group_add required the group to already exist. Membership is stored even when buildmaster_group has not run yet. Finalize (_bm_group_plan) is the only existence check: an id named by buildmaster_group_add that was never created is FATAL, including when that was the only declaration. Cycles and id clashes stay FATAL where they already were. A group is still not a component, a meta, or a link edge. Fixture groups-late: buildmaster_group_add names late-outer and late-inner before either buildmaster_group. The outline is still late-outer → late-inner → late-leaf (indent 2). Negative group-undefined dies at configure with group was never created.
  • Shared-dep skip dropped the consumer's need. First-wins still skips configure and build when links/<id>.cmake already exists (already built by). That skip is not "this consumer has no dependency". The nested process appends the skipped id to bm-reuse-needs.txt. After that configure returns, the parent walks the id and the dests already stored in its links file and hangs the closure on the consumer (LINKS_ATTACHED, so a later rewrite keeps it). <consumer>_configure / <consumer>_build wait on <id>_install when that stage is in this process, otherwise on the parent component that created the links file (<owner>_install). A skipped configure is still not a second build. Fixture links-race: RaceA and RaceB both declare RaceMid, RaceMid declares RaceBase, no parent buildmaster_depend and no hoist. RaceB_build waits on RaceA_install. Both shared libs call a Base-only symbol and link only RaceMid.
  • Transitive buildmaster_link stopped at one recorded hop. buildmaster_link(A B) still names only B. _bm_links_write_one now unions this process's link edges with LINKS_ATTACHED and the dests already stored in links/<id>.cmake, then walks those ids to a fixpoint (seen-set, cycle cut). A parent rewrite no longer replaces links/StormByte-String.cmake with the edges it knows and drops String → Base. A later configure that skips the winner still flattens -l / Stem.lib for the whole chain (--no-allow-shlib-undefined, Apple -undefined,error; Windows already fails unresolved). The caller does not name grandparents. Fixture links-transitive: shared TransBase ← TransMid ← TransUpper, and deferred TransLeaf links only TransUpper after the skip, while calling a Base-only symbol.
  • WHOLE wrap was empty on ELF. _bm_opt_whole_items built -Wl,--whole-archive + produced .a + -Wl,--no-whole-archive, then fragment.cmake flattened the CMake list to spaces and target_link_libraries(<id> INTERFACE …) let CMake classify the -Wl tokens as flags and the archives as libraries. The DSO line became libavutil.a … libavfilter.a -Wl,--whole-archive -Wl,--no-whole-archive. GNU ld.bfd (single pass) then dropped unreferenced avutil objects (av_md5_sum, AES/HMAC, …) while lld still linked. ELF now emits one $<LINK_GROUP:BM_WHOLE,…> and registers CMAKE_{,C_,CXX_}LINK_GROUP_USING_BM_WHOLE (prefix / suffix --whole-archive / --no-whole-archive) so every produced static of that id stays inside the wrap. Apple (-force_load) and MSVC (-WHOLEARCHIVE:) are unchanged. The fragment no longer replaces ; with spaces. WHOLE still means one region around all produced archives of the id, not one wrap per file.