Repository navigation
Version 2.1.0
[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:
- How to write a component, every optstr key, and the contract: README.md
- The ten names, and nothing else: public_functions.md
- Porting an older caller: MIGRATE.md
Added
BACKEND=binarypublishes a prebuilt archive into the shared prefix. The third argument ofbuildmaster_componentis anhttp://,https://orfile://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 exceptlib/andlib64/, theninclude(GNUInstallDirs)and copies whichever of those two exists into that libdir. The script setsCMAKE_SYSTEM_NAMEand the pointer size first, becausecmake -Phas neither and the module would warn. If both exist, the one already named for this machine wins, so a zip built withlib/works on alib64host and the reverse.FILES=source trees are not rewritten. Mode isstaticorshared. Each produced spec becomes an IMPORTED library on the component id. On Windows the import library follows that libdir and the.dllstays inbin/.ALIAS=points at the id.buildmaster_group_add,buildmaster_dependandbuildmaster_linkaccept the id.buildmaster_linkputs the dest on the id's INTERFACE and makes<id>_installwait on that dest, so the dest archive is downloaded and extracted first.NOINSTALL,REPACK,WHOLE,FILES=,GIT=,SOURCE=,headers,executableand meta membership are FATAL. The fourth argument is ignored. Harnessbinary-backendbuilds 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.liborlibwidget.so):find_libraryon Windows does not searchlib64. Negative configures cover the FATAL flags.
Fixed
- File-tool paths were never initialized.
tools/file/init_vars.cmakewas not included, soBUILDMASTER_TOOLS_FILE_SRCDIRwas empty and a cached download looked for/templates/file_download.cmake.in.tools/file/helpers.cmakeincludes it. The same include exports the path into the toolchain. - Harness
binary-backendfindswidget_drive.exeon Windows. The driver iscmake -P, which does not setCMAKE_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_walkchecksIS_SYMLINKbefore a directory or a regular file. The digest line is the relative path, the kind (symlink-file,symlink-directoryorsymlink-dangling) and the target text fromfile(READ_SYMLINK). The link is not opened and its target is not walked, so a directory link and a dangling link never reachfile(SHA256). Retargeting a file link changes the digest even when both targets have the same bytes. A regular file is stillrelpath digest, so a tree with no links does not change key. Harnessstamp-symlinkscovers 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 ranGNUInstallDirson its own, so on Debian it installed intolib/while BuildMaster renamed insidelib64/after the harness forced that directory. The configure now passes-DCMAKE_INSTALL_LIBDIR. Meson already passed--libdir.