const std = @import("std"); pub fn build(b: *std.Build) void { const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{}); const math_mod = b.addModule("math", .{ .root_source_file = b.path("src/math.zig"), .target = target, }); const strings_mod = b.addModule("strings", .{ .root_source_file = b.path("src/strings.zig"), .target = target, }); const math_tests = b.addTest(.{ .root_module = b.createModule(.{ .root_source_file = b.path("src/math.zig"), .target = target, .optimize = optimize, }), }); const strings_tests = b.addTest(.{ .root_module = b.createModule(.{ .root_source_file = b.path("src/strings.zig"), .target = target, .optimize = optimize, }), }); _ = math_mod; _ = strings_mod; const run_math = b.addRunArtifact(math_tests); const run_strings = b.addRunArtifact(strings_tests); const test_step = b.step("test", "Run all tests"); test_step.dependOn(&run_math.step); test_step.dependOn(&run_strings.step); }