authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-11-26 00:16:30 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-11-26 00:16:30 -08:00
log88e1859fb3ebd99970a4dbc3f16959fc344d09d5
treeec44e0b90c452eb55fe0a914f7754b08c57037cb
parent1bf0ae4d60f0c7f9389ee61790ed6fbda0557f0b

build.zig: update for zig 0.11.0


1 files changed, 9 insertions(+), 7 deletions(-)

build.zig+9-7
...@@ -3,16 +3,18 @@ const deps = @import("./deps.zig");...@@ -3,16 +3,18 @@ const deps = @import("./deps.zig");
33
4pub fn build(b: *std.build.Builder) void {4pub fn build(b: *std.build.Builder) void {
5 const target = b.standardTargetOptions(.{});5 const target = b.standardTargetOptions(.{});
6 const mode = b.option(std.builtin.Mode, "mode", "") orelse .Debug;
67
7 const mode = b.standardReleaseOptions();8 const exe = b.addExecutable(.{
89 .name = "zig-pek",
9 const exe = b.addExecutable("zig-pek", "src/main.zig");10 .root_source_file = .{ .path = "src/main.zig" },
10 exe.setTarget(target);11 .target = target,
11 exe.setBuildMode(mode);12 .optimize = mode,
13 });
12 deps.addAllTo(exe);14 deps.addAllTo(exe);
13 exe.install();15 b.installArtifact(exe);
1416
15 const run_cmd = exe.run();17 const run_cmd = b.addRunArtifact(exe);
16 run_cmd.step.dependOn(b.getInstallStep());18 run_cmd.step.dependOn(b.getInstallStep());
17 if (b.args) |args| {19 if (b.args) |args| {
18 run_cmd.addArgs(args);20 run_cmd.addArgs(args);