authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-11-26 00:14:32 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-11-26 00:14:32 -08:00
logf130e021ffdfcfb3b44fba8f256bddc4375832e7
tree9c0a4452a9da789c54e5ecc6ae5769454a79fce7
parent433859a3033e400bc9245b602beb4909a60552b3

build.zig: update for zig 0.11.0


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

build.zig+9-13
......@@ -2,23 +2,19 @@ const std = @import("std");
22const deps = @import("./deps.zig");
33
44pub fn build(b: *std.build.Builder) void {
5 // Standard target options allows the person running `zig build` to choose
6 // what target to build for. Here we do not override the defaults, which
7 // means any target is allowed, and the default is native. Other options
8 // for restricting supported target set are available.
95 const target = b.standardTargetOptions(.{});
6 const mode = b.option(std.builtin.Mode, "mode", "") orelse .Debug;
107
11 // Standard release options allow the person running `zig build` to select
12 // between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
13 const mode = b.standardReleaseOptions();
14
15 const exe = b.addExecutable("zig-oauth2", "./main.zig");
16 exe.setTarget(target);
17 exe.setBuildMode(mode);
8 const exe = b.addExecutable(.{
9 .name = "zig-oauth2",
10 .root_source_file = .{ .path = "./main.zig" },
11 .target = target,
12 .optimize = mode,
13 });
1814 deps.addAllTo(exe);
19 exe.install();
15 b.installArtifact(exe);
2016
21 const run_cmd = exe.run();
17 const run_cmd = b.addRunArtifact(exe);
2218 run_cmd.step.dependOn(b.getInstallStep());
2319 if (b.args) |args| {
2420 run_cmd.addArgs(args);