treesummaryrefslogcommitdiff
path: root/build.zig
diff options
context:
space:
mode:
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig12
1 files changed, 9 insertions, 3 deletions
diff --git a/build.zig b/build.zig
index 85c7417..dd9ca93 100644
--- a/build.zig
+++ b/build.zig
@@ -12,9 +12,15 @@ pub fn build(b: *std.Build) void {
.optimize = optimize,
}),
});
-
b.installArtifact(exe);
- const exe_tests = b.addTest(.{ .root_module = exe.root_module });
- b.step("test", "Run tests").dependOn(&b.addRunArtifact(exe_tests).step);
+ const exe_run = b.addRunArtifact(exe);
+ const exe_run_step = b.step("run", "Run");
+ exe_run_step.dependOn(&exe_run.step);
+ exe_run.step.dependOn(b.getInstallStep());
+ if (b.args) |args| exe_run.addArgs(args);
+
+ const exe_test = b.addTest(.{ .root_module = exe.root_module });
+ const exe_test_step = b.step("test", "Run tests");
+ exe_test_step.dependOn(&b.addRunArtifact(exe_test).step);
}