From 729990060aa9fc694ee8d030813eb1e553ffa735 Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Thu, 21 Oct 2021 20:36:43 -0700 Subject: [PATCH] cleanup build.zig --- build.zig | 23 +++++++++++------------ time.zig | 1 - 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/build.zig b/build.zig index 6394c9fe15b47b072952770b58d8001d88ebc473..2a47b70136549550f9f536c7a9a872e046d5c5cc 100644 --- a/build.zig +++ b/build.zig @@ -1,27 +1,26 @@ const std = @import("std"); +const deps = @import("./deps.zig"); pub fn build(b: *std.build.Builder) void { - // Standard target options allows the person running `zig build` to choose - // what target to build for. Here we do not override the defaults, which - // means any target is allowed, and the default is native. Other options - // for restricting supported target set are available. const target = b.standardTargetOptions(.{}); - // Standard release options allow the person running `zig build` to select - // between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. const mode = b.standardReleaseOptions(); const exe = b.addExecutable("zig-time", "main.zig"); exe.setTarget(target); exe.setBuildMode(mode); + deps.addAllTo(exe); exe.install(); - const run_cmd = exe.run(); - run_cmd.step.dependOn(b.getInstallStep()); - if (b.args) |args| { - run_cmd.addArgs(args); + { + const run_cmd = exe.run(); + run_cmd.step.dependOn(b.getInstallStep()); + if (b.args) |args| { + run_cmd.addArgs(args); + } + + const run_step = b.step("run", "Run the app"); + run_step.dependOn(&run_cmd.step); } - const run_step = b.step("run", "Run the app"); - run_step.dependOn(&run_cmd.step); } diff --git a/time.zig b/time.zig index d5234ce622edeaad905675cd65387fce133a316f..6e056272deb5e90a3070b732c4042e5b44223c8c 100644 --- a/time.zig +++ b/time.zig @@ -221,7 +221,6 @@ pub const DateTime = struct { }, else => @compileError("'" ++ @tagName(tag) ++ "' not currently supported"), - } next = null; s = i; -- 2.54.0