Using zig build system to build CppUTest unit test library.
ATTENTION this port only support "Plateform/Gcc" with stdlib enable."
First update your build.zig.zon with:
zig fetch --save git+https://github.com/lcp5y3/cpputest-zig.git#b409129f4472213c222ce861e4f891fefa4d1c5eAfter that you can link CppUTest with your project by adding the following
lines to your build.zig
const cpputest_dep = b.dependency("cpputest", .{
.target = target,
.optimize = optimize,
});
exe.root_module.linkLibrary(cpputest_dep.artifact("CppUTest"));
exe.root_module.linkLibrary(cpputest_dep.artifact("CppUTestExt"));If you only want to build CppUTest to get .a and header, run:
zig build