const std = @import("std"); const bh = @import("bh"); pub fn build(b: *std.Build) void { const opts = bh.declareOptions(b); const mod = b.addModule("zmath", .{ .target = opts.target, .optimize = opts.optimize, .root_source_file = b.path("zmath.zig"), }); const test_step = b.step("test", "runs tests for zmath"); const tests = b.addTest(.{ .root_module = b.createModule(.{ .target = opts.target, .optimize = opts.optimize, .root_source_file = b.path("zmath.zig"), .link_libc = true, }), }); tests.root_module.addImport("zmath", mod); const runArtifact = b.addRunArtifact(tests); test_step.dependOn(&runArtifact.step); }