CommonsBase_Build.CMake0.Bundle@3.25.3
$ get-asset CommonsBase_Build.CMake0.Bundle@3.25.3 -p cmake-darwin_universal.zip -f ${RUNTIME}/a1
\test(pass)
\dk.asset(path: "cmake-darwin_universal.zip", value-id: "ajjqc36qkgaflit2qxg2ayr5gjfiekyaikkgaxiwtvr463hmlg6ka", byteSize: "80161981")\;
$ get-asset CommonsBase_Build.CMake0.Bundle@3.25.3 -p cmake-linux_arm64.zip -f ${RUNTIME}/a2
\test(pass)
\dk.asset(path: "cmake-linux_arm64.zip", value-id: "a6ccbymavku5pjrg2giaozjc35lwxpa4eq6nw5qv3uf2hnpkhqilq", byteSize: "44899058")\;
$ get-asset CommonsBase_Build.CMake0.Bundle@3.25.3 -p cmake-linux_x86_64.zip -f ${RUNTIME}/a3
\test(pass)
\dk.asset(path: "cmake-linux_x86_64.zip", value-id: "a4og42sdel4bzx763wqmhjnqe2feiql6njkgexflbzlqr7vmdggca", byteSize: "45788799")\;
$ get-asset CommonsBase_Build.CMake0.Bundle@3.25.3 -p cmake-linux_x86.zip -f ${RUNTIME}/a4
\test(pass)
\dk.asset(path: "cmake-linux_x86.zip", value-id: "am3qa2663r76v226xjftixsgerl3j4bcujq7vyh4est7fye2ojisa", byteSize: "44946942")\;
$ get-asset CommonsBase_Build.CMake0.Bundle@3.25.3 -p cmake-3.25.3-windows-x86_64.zip -f ${RUNTIME}/a5
\test(pass)
\dk.asset(path: "cmake-3.25.3-windows-x86_64.zip", value-id: "ap4puij6vpw64crkhh6bgsyfgporhjw4h34tmhgfxyzeeqm77ngma", byteSize: "41490629")\;
$ get-asset CommonsBase_Build.CMake0.Bundle@3.25.3 -p cmake-3.25.3-windows-i386.zip -f ${RUNTIME}/a6
\test(pass)
\dk.asset(path: "cmake-3.25.3-windows-i386.zip", value-id: "a6hznijbmw57hikmvdc35dbdyk7bnwdxt2feoowe6tx6xpwpwsrfa", byteSize: "38114288")\;
$ get-asset CommonsBase_Build.CMake0.Bundle@3.25.3 -p cmake-3.25.3-windows-arm64.zip -f ${RUNTIME}/a7
\test(pass)
\dk.asset(path: "cmake-3.25.3-windows-arm64.zip", value-id: "azdpj6lgvg2dz5nu24r7pgfdxknwosrso75wjibkdh4q52iwho5zq", byteSize: "40937837")\;
CommonsBase_Build.CMake0.Build@3.25.3
(UI rule) Generates a CMake build system in the build directory.
### Configurations
One of the following sets of options must be provided:
- installdir= src[]= out[]=
- installdir= src[]= outexe[]=
- installdir= mirrors[]= urlpath= out[]=
- installdir= mirrors[]= urlpath= outexe[]=
### Options
- src[]: list of glob patterns for the local source directory
- mirrors[]: HTTP base urls to download the CMake source directory
- urlpath: path added to the mirrors so full URL is a ZIP file of the CMake source directory
- installdir: (required) the install directory to pass to `cmake --install ... --prefix INSTALL_DIRECTORY`
- generator: the cmake generator to use (defaults to "none" on Windows, "Ninja" on other OS-es).
The special value "none" removes the "-G GENERATOR" CMake option so CMake selects any
available compiler.
- sourcesubdir: subdirectory inside the asset or bundle that contains the CMakeLists.txt (defaults to root of asset or bundle)
- nstrip: levels of leading directories to nstrip while extract asset or bundle (defaults to 0)
- gargs[]: list of cmake generator arguments to pass to cmake executable.
The -S source directory is required.
The -B build directory will already be set.
- bargs[]: list of cmake build arguments to pass to cmake executable.
- iargs[]: list of cmake install arguments to pass to cmake executable.
- out[]: list of expected output files in the install directory
- outexe[]: list of expected executable files in the install directory. On Windows `.exe` is added automatically.
ie. outexe[]=bin/xyz is the equivalent of out[]=bin/xyz.exe on Windows and out[]=bin/xyz on Unix
- outrmexact[]: list of exact strictly relative paths (relative to build directory) to remove
- outrmglob[]: list of "fd" filename glob patterns for files in the build directory to remove after outrmexact[].
Remove every file type except directories; use outrmexact for directories for safety.
- exe[]: list of glob patterns for executables to set execute permissions (Unix) and locally codesign (macOS).
-- COMPILERS
--
-- ::: Windows / Visual Studio
-- The default generator is nothing on Windows. CMake will select any available compiler,
-- which may be the latest Visual Studio if your build machine has Visual Studio installed.
-- DESIGN QUESTIONS
-- Q1: Why a rule instead of a simpler `get-object`?
-- ANS1: Because dk0 objects are deterministic zip files that do not allow symlinks.
-- Symlinks cause inconsistency across platforms so with deterministic objects
-- the CMake.app code signature output by `get-object` would be invalid on macOS.
--
-- Q2: CMAKE_INSTALL_PREFIX?
-- The CMAKE_INSTALL_PREFIX is set for CMake projects like google/or-tools that do not respect
-- the prefix option in `cmake --install --prefix` (usually when the project sets CMAKE_INSTALL_PREFIX CACHE
-- variable by default).
--
-- Q3: Hermeticity?
-- In a <FUTURE> version, CMakeCache.txt can be checked in this rule to find out if all the CACHE variables are hermetic.
-- Example: BAD: _Python3_EXECUTABLE:INTERNAL=/opt/homebrew/Frameworks/Python.framework/Versions/3.11/bin/python3.11
-- Example: GOOD: generated_dir:INTERNAL=/Volumes/SSD/Source/dk/t/p/4472/e7lu/f/Release.Darwin_arm64/b/_deps/googletest-build/googletest/generated
### Examples
$ run CommonsBase_Build.CMake0.Build@3.25.3 installdir=${RUNTIME}/i/llama-cpp
> 'mirrors[]=https://github.com/ggml-org/llama.cpp/archive/refs/tags'
> 'urlpath=b7974.zip#be9d624603e39cd4edee5fa85e8812eb8e1393537c8e4e4629bc4bd016388053,29881192'
> 'nstrip=1'
> 'gargs[]=-DBUILD_SHARED_LIBS:BOOL=OFF' 'gargs[]=-DCMAKE_BUILD_TYPE=Release'
> 'bargs[]=--config' 'bargs[]=Release'
> 'iargs[]=--config' 'iargs[]=Release'
> 'exe[]=bin/*'
> 'outexe[]=bin/llama-quantize'
> 'outrmglob[]=test-*' 'outrmglob[]=*.py' 'outrmglob[]=llama-[a-p]*' 'outrmglob[]=llama-[r-z]*'
> 'outrmexact[]=include' 'outrmexact[]=lib' 'outrmexact[]=lib64'
[pass] (no-eol)
CommonsBase_Build.CMake0.F_Build@3.25.3
(Free rule) Generates a CMake build directory, builds the CMake project and installs the CMake project in the output directory.
### Configurations
One of the following sets of options must be provided:
- bundlemodver=
- assetmodver= assetpath=
### Options
- generator: the cmake generator to use (defaults to "none" on Windows, "Ninja" on other OS-es).
The special value "none" removes the "-G GENERATOR" CMake option so CMake selects any
available compiler.
- assetmodver: bundle module@version; see assetpath
- assetpath: asset inside the [assetmodver] bundle of the CMake source directory
- overlayassetpath: path inside the [assetmodver] asset module that gets layered on top of the source
- bundlemodver: bundle module@version of CMake source directory; overlayassetpath ignored
- overlaybundlemodver: bundle module@version that gets layered on top of the source
- sourcesubdir: subdirectory inside the asset or bundle that contains the CMakeLists.txt (defaults to root of asset or bundle)
- nstrip: levels of leading directories to nstrip while extract asset or bundle (defaults to 0)
- gargs[]: list of cmake generator arguments to pass to cmake executable.
The -S source directory is required.
The -B build directory will already be set.
- bargs[]: list of cmake build arguments to pass to cmake executable.
- iargs[]: list of cmake install arguments to pass to cmake executable.
- out[]: list of expected output files in the install directory
- outexe[]: list of expected executable files in the install directory. On Windows `.exe` is added automatically.
ie. outexe[]=bin/xyz is the equivalent of out[]=bin/xyz.exe on Windows and out[]=bin/xyz on Unix
- outrmexact[]: list of exact strictly relative paths (relative to build directory) to remove
- outrmglob[]: list of "fd" filename glob patterns for files in the build directory to remove after outrmexact[].
Remove every file type except directories; use outrmexact for directories for safety.
- exe[]: list of glob patterns for executables to set execute permissions (Unix) and locally codesign (macOS).
### Examples
$ post-object CommonsBase_Build.CMake0.F_Build@3.25.3 -d t/o/somewhere/
> assetmodver=CommonsBase_Build.Apparatus.HelloWorld@0.1.0
> assetpath=dist/hw
> gargs[]=-DCMAKE_BUILD_TYPE=Release
> bargs[]=--config bargs[]=Release
> iargs[]=--config iargs[]=Release
> outexe[]=bin/hello
\test(pass)
\dk.object(abi: "Release.Linux_x86_64", value-id: "oi3jvicq74t5qojnntwu63ajrcsbo6kbvbvvyeswbpes5it4y2efq")\;
which runs:
- `get-asset <assetmodver> -p <assetpath> -d s [-or-] get-bundle <bundlemodver> -d s`
- (if generator is "Ninja") `$(get-object CommonsBase_Build.Ninja0@1.12.1 -s Release.<execution abi> -m ./ninja.exe -f : -e '*')`
- `cmake
-G <generator> (if generator is "Ninja")
-S s/<sourcesubdir> -B b
-DCMAKE_INSTALL_PREFIX:FILEPATH=${SLOTABS.Release.execution_abi}
-DCMAKE_MAKE_PROGRAM:FILEPATH=<path to ninja.exe> (if generator is "Ninja")
<gargs>`
- `cmake --build b <bargs>`
- `cmake --install b --prefix ${SLOTABS.Release.execution_abi} <iargs>`
CommonsBase_Build.Ninja0@1.12.1
$ get-object CommonsBase_Build.Ninja0@1.12.1 -s Release.Windows_arm64 -f ${RUNTIME}/Windows_arm64-Ninja0-1.12.1.zip
\test(pass)
\dk.object(abi: "Release.Windows_arm64", value-id: "osazbl5uyb3m4yc3wbvtyvwq75ncf6kwhghsc7o7zzqkayxz6s3sa")\;
$ get-object CommonsBase_Build.Ninja0@1.12.1 -s Release.Windows_x86_64 -f ${RUNTIME}/Windows_x86_64-Ninja0-1.12.1.zip
\test(pass)
\dk.object(abi: "Release.Windows_x86_64", value-id: "oxeoosleep7sa5lb4g3lssoegajgthfxpu2x7wd2vt2ese7wudcoq")\;
$ get-object CommonsBase_Build.Ninja0@1.12.1 -s Release.Darwin_arm64 -f ${RUNTIME}/Darwin_arm64-Ninja0-1.12.1.zip
\test(pass)
\dk.object(abi: "Release.Darwin_arm64", value-id: "ohbidmffyeodcth4fqhlfrlfeg5c3j7w56zzfxltqjob6vtyi3owa")\;
$ get-object CommonsBase_Build.Ninja0@1.12.1 -s Release.Darwin_x86_64 -f ${RUNTIME}/Darwin_x86_64-Ninja0-1.12.1.zip
\test(pass)
\dk.object(abi: "Release.Darwin_x86_64", value-id: "oxtqvbjzqrrrkq6cogsb6daux34rtsm2trcp6frpjtrfz3tcxigoq")\;
$ get-object CommonsBase_Build.Ninja0@1.12.1 -s Release.Linux_x86 -f ${RUNTIME}/Linux_x86-Ninja0-1.12.1.zip
\test(pass)
\dk.object(abi: "Release.Linux_x86", value-id: "oknuyrdqfc7wxfuzo7fag6wo67uhudvg73rlsyursa2qi7rl2vasq")\;
$ get-object CommonsBase_Build.Ninja0@1.12.1 -s Release.Linux_x86_64 -f ${RUNTIME}/Linux_x86_64-Ninja0-1.12.1.zip
\test(pass)
\dk.object(abi: "Release.Linux_x86_64", value-id: "oe7dmxtsno2tpawkvnjzjipdwodgnpivq4drxhzzq4lsg5qtlwqra")\;
$ get-object CommonsBase_Build.Ninja0@1.12.1 -s Release.Linux_arm64 -f ${RUNTIME}/Linux_arm64-Ninja0-1.12.1.zip
\test(pass)
\dk.object(abi: "Release.Linux_arm64", value-id: "ornywcjsnickrz5ihkprqcdsxm36qmtt5dsuy7t3tmwar4pahbaya")\;
CommonsBase_Build.VSWhere@3.1.7
$ get-object CommonsBase_Build.VSWhere@3.1.7 -s Release.Windows_arm64 -f ${RUNTIME}/Windows_arm64-VSWhere-3.1.7.zip
\test(pass)
\dk.object(abi: "Release.Windows_arm64", value-id: "oxkvqdyqqkckzixie4no4qcww4xnt2nk5s7mdo6igqnbip7gsfxlq")\;
$ get-object CommonsBase_Build.VSWhere@3.1.7 -s Release.Windows_x86 -f ${RUNTIME}/Windows_x86-VSWhere-3.1.7.zip
\test(pass)
\dk.object(abi: "Release.Windows_x86", value-id: "oemwxule77tg56amz4t2xsyjwqjc5sqnwbryimrjf2ozvgwl3hy7q")\;
$ get-object CommonsBase_Build.VSWhere@3.1.7 -s Release.Windows_x86_64 -f ${RUNTIME}/Windows_x86_64-VSWhere-3.1.7.zip
\test(pass)
\dk.object(abi: "Release.Windows_x86_64", value-id: "ooksmbvvs7gwkwdcyqbfpul33gasjuamvllvjo2r3aulzxqn4smfa")\;
CommonsBase_Build.Age@1.3.1
`age` and `age-keygen` for file encryption. Tar slots use
`CommonsBase_Std.Extract.F_Untar@0.2.0` (selective path extraction).
$ get-object CommonsBase_Build.Age@1.3.1 -s Release.Windows_x86_64 -f ${RUNTIME}/Windows_x86_64-Age-1.3.1.zip
\test(pass)
\dk.object(abi: "Release.Windows_x86_64", value-id: "ol42sancrjf36auqfxvqoy5qkltbryjavnjkcorxt6p4sl47mcnua")\;
$ get-object CommonsBase_Build.Age@1.3.1 -s Release.Linux_x86_64 -f ${RUNTIME}/Linux_x86_64-Age-1.3.1.zip
\test(pass)
\dk.object(abi: "Release.Linux_x86_64", value-id: "oedpzmnqk4ya45djudefpsco5eo3ts6k5ojpyb7fdblqe3mid6gfq")\;
$ get-object CommonsBase_Build.Age@1.3.1 -s Release.Linux_arm64 -f ${RUNTIME}/Linux_arm64-Age-1.3.1.zip
\test(pass)
\dk.object(abi: "Release.Linux_arm64", value-id: "omd4qexkvhw6f65uibqzjzuisfaie37rdcs37rzzhanuj2bn26vza")\;
$ get-object CommonsBase_Build.Age@1.3.1 -s Release.Darwin_x86_64 -f ${RUNTIME}/Darwin_x86_64-Age-1.3.1.zip
\test(pass)
\dk.object(abi: "Release.Darwin_x86_64", value-id: "o2ikk5lhs3gd3qo3lt2jjxa4l23ks2folvwcdcahhqbnj7assxsza")\;
$ get-object CommonsBase_Build.Age@1.3.1 -s Release.Darwin_arm64 -f ${RUNTIME}/Darwin_arm64-Age-1.3.1.zip
\test(pass)
\dk.object(abi: "Release.Darwin_arm64", value-id: "oy2e27afox5clyexvrhqjotw7rx3ybxblrnuvfhvkfodijtcdwcrq")\;
CommonsBase_Build.GitHubCLI@2.92.0
`gh` GitHub CLI. Linux slots use `CommonsBase_Std.Extract.F_Untar@0.2.0`
(selective path extraction); Windows and Darwin slots use `get-asset`.
$ get-object CommonsBase_Build.GitHubCLI@2.92.0 -s Release.Windows_x86 -f ${RUNTIME}/Windows_x86-GitHubCLI-2.92.0.zip
\test(pass)
\dk.object(abi: "Release.Windows_x86", value-id: "ogku2dt3tmegyntsw6mix2eiacfhhjwvl66o52mwrcf4epo5szs2q")\;
$ get-object CommonsBase_Build.GitHubCLI@2.92.0 -s Release.Windows_x86_64 -f ${RUNTIME}/Windows_x86_64-GitHubCLI-2.92.0.zip
\test(pass)
\dk.object(abi: "Release.Windows_x86_64", value-id: "okqvx6ezhymtqk4etjltl3m3ik3tmltrumafi762ybpkodanjpvqa")\;
$ get-object CommonsBase_Build.GitHubCLI@2.92.0 -s Release.Windows_arm64 -f ${RUNTIME}/Windows_arm64-GitHubCLI-2.92.0.zip
\test(pass)
\dk.object(abi: "Release.Windows_arm64", value-id: "o4hreoiypmsplbsuujhuqdt7qrevwnywgtbuut66tzol44326r6sa")\;
$ get-object CommonsBase_Build.GitHubCLI@2.92.0 -s Release.Linux_x86 -f ${RUNTIME}/Linux_x86-GitHubCLI-2.92.0.zip
\test(pass)
\dk.object(abi: "Release.Linux_x86", value-id: "ot77eu32ew4i7m54cdtq3tw56livw326iqohx3yurvqotgfuljd3q")\;
$ get-object CommonsBase_Build.GitHubCLI@2.92.0 -s Release.Linux_x86_64 -f ${RUNTIME}/Linux_x86_64-GitHubCLI-2.92.0.zip
\test(pass)
\dk.object(abi: "Release.Linux_x86_64", value-id: "ou2c665d5at454qnljnaa66k232x2syjon76oqckiy6wtkblopz2a")\;
$ get-object CommonsBase_Build.GitHubCLI@2.92.0 -s Release.Linux_arm64 -f ${RUNTIME}/Linux_arm64-GitHubCLI-2.92.0.zip
\test(pass)
\dk.object(abi: "Release.Linux_arm64", value-id: "oh3sqi47dwlyrziyevv7zji5jj3ycqlsnws4qupkpw4omgi3tzzvq")\;
$ get-object CommonsBase_Build.GitHubCLI@2.92.0 -s Release.Darwin_x86_64 -f ${RUNTIME}/Darwin_x86_64-GitHubCLI-2.92.0.zip
\test(pass)
\dk.object(abi: "Release.Darwin_x86_64", value-id: "oew33hjrlccybkmmphlgdlmgzq2ox3ew4vee3fz33xsfgs2vjxtaq")\;
$ get-object CommonsBase_Build.GitHubCLI@2.92.0 -s Release.Darwin_arm64 -f ${RUNTIME}/Darwin_arm64-GitHubCLI-2.92.0.zip
\test(pass)
\dk.object(abi: "Release.Darwin_arm64", value-id: "orstlyhdkgmvlg7fqgvulfafhee7vn6dmumfvzknxx4hrfgxs2jza")\;
CommonsBase_Build.Git.MinGit@2.55.0
MinGit (git-for-windows) whole-tree prebuilt: `cmd/git.exe` plus its
`mingw64|mingw32|clangarm64` runtime, Windows slots only. `cmd/` deliberately
contains no bash, so the object is safe for
`opam init --git-location=<obj>/cmd`. Whole-zip `get-asset` extraction per
slot; the exhaustive outputs were generated from a local extraction of the
pinned zips.
$ get-object CommonsBase_Build.Git.MinGit@2.55.0 -s Release.Windows_x86_64 -f ${RUNTIME}/Windows_x86_64-Git.MinGit-2.55.0.zip
\test(pass)
\dk.object(abi: "Release.Windows_x86_64", value-id: "o3lm5afrryywtvglphf5fut234kc6au54mmltkzxdr46skouby7nq")\;
$ get-object CommonsBase_Build.Git.MinGit@2.55.0 -s Release.Windows_x86 -f ${RUNTIME}/Windows_x86-Git.MinGit-2.55.0.zip
\test(pass)
\dk.object(abi: "Release.Windows_x86", value-id: "okt6q3a7yqkxvd4jixcyqb52cdrvr5oprkygdhexnf4acdsidgyuq")\;
$ get-object CommonsBase_Build.Git.MinGit@2.55.0 -s Release.Windows_arm64 -f ${RUNTIME}/Windows_arm64-Git.MinGit-2.55.0.zip
\test(pass)
\dk.object(abi: "Release.Windows_arm64", value-id: "ohfdxbl7oystrglbp3lpduqxptd42e5ddagwj7rs3bx24p2qcvslq")\;