| ... | ... | @@ -1,27 +1,26 @@ |
| 1 | 1 | const std = @import("std"); |
| 2 | const deps = @import("./deps.zig"); |
| 2 | 3 | |
| 3 | 4 | pub fn build(b: *std.build.Builder) void { |
| 4 | | // Standard target options allows the person running `zig build` to choose |
| 5 | | // what target to build for. Here we do not override the defaults, which |
| 6 | | // means any target is allowed, and the default is native. Other options |
| 7 | | // for restricting supported target set are available. |
| 8 | 5 | const target = b.standardTargetOptions(.{}); |
| 9 | 6 | |
| 10 | | // Standard release options allow the person running `zig build` to select |
| 11 | | // between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. |
| 12 | 7 | const mode = b.standardReleaseOptions(); |
| 13 | 8 | |
| 14 | 9 | const exe = b.addExecutable("zig-time", "main.zig"); |
| 15 | 10 | exe.setTarget(target); |
| 16 | 11 | exe.setBuildMode(mode); |
| 12 | deps.addAllTo(exe); |
| 17 | 13 | exe.install(); |
| 18 | 14 | |
| 19 | | const run_cmd = exe.run(); |
| 20 | | run_cmd.step.dependOn(b.getInstallStep()); |
| 21 | | if (b.args) |args| { |
| 22 | | run_cmd.addArgs(args); |
| 15 | { |
| 16 | const run_cmd = exe.run(); |
| 17 | run_cmd.step.dependOn(b.getInstallStep()); |
| 18 | if (b.args) |args| { |
| 19 | run_cmd.addArgs(args); |
| 20 | } |
| 21 | |
| 22 | const run_step = b.step("run", "Run the app"); |
| 23 | run_step.dependOn(&run_cmd.step); |
| 23 | 24 | } |
| 24 | 25 | |
| 25 | | const run_step = b.step("run", "Run the app"); |
| 26 | | run_step.dependOn(&run_cmd.step); |
| 27 | 26 | } |