catch2
catch2

allyourcodebase/catch2

MIT

Catch 2 ported to the zig build system

0 0 0 1
1
build.zig.zon  build.zig 
View on Github  
Updated: 8:48:47 PM Wed Sep 18 2024 Size: 5KB Created: 8:09:35 PM Wed Sep 18 2024
Dependencies:
upstream
zig  fetch  --save  git+https://github.com/allyourcodebase/catch2

build.zig for Catch2

Provides a package to be used by the zig package manager for C++ programs.

Status

Refname Catch2 version Zig 0.12.x Zig 0.13.x Zig 0.14.0-dev
3.7.1 v3.7.1

Use

Add the dependency in your build.zig.zon by running the following command:

zig fetch --save git+https://github.com/allyourcodebase/catch2#3.7.1

Then, in your build.zig:

const catch2_dep = b.dependency("catch2", { .target = target, .optimize = optimize });
const catch2 = catch2_dep.artifact("Catch2"); // or Catch2WithMain
// wherever needed:
exe.linkLibrary(catch2);