| 1 | const std = @import("std"); |
| 2 | |
| 3 | pub fn build(b: *std.Build) void { |
| 4 | const test_step = b.step("test", "Test the program"); |
| 5 | b.default_step = test_step; |
| 6 | |
| 7 | const optimize = std.builtin.Optimize.debug; |
| 8 | const target = b.graph.host; |
| 9 | |
| 10 | const main = b.addExecutable(.{ |
| 11 | .name = "main", |
| 12 | .root_module = b.createModule(.{ |
| 13 | .root_source_file = b.path("main.zig"), |
| 14 | .optimize = optimize, |
| 15 | .target = target, |
| 16 | .strip = true, |
| 17 | }), |
| 18 | }); |
| 19 | |
| 20 | // TODO: actually check the output |
| 21 | _ = main.getEmittedBin(); |
| 22 | |
| 23 | test_step.dependOn(&main.step); |
| 24 | } |