diff --git a/build.zig b/build.zig index 8f612a4..2299d3c 100644 --- a/build.zig +++ b/build.zig @@ -40,6 +40,18 @@ pub fn build(b: *std.Build) void { // step when running `zig build`). b.installArtifact(exe); + const exe_check = b.addExecutable(.{ + .name = "check", + .root_source_file = b.path("src/main.zig"), + .target = target, + .optimize = optimize, + }); + exe_check.root_module.addImport("zlog", zlog.module("zlog")); + exe_check.root_module.addImport("zterm", zterm.module("zterm")); + + const check = b.step("check", "Check if project compiles"); + check.dependOn(&exe_check.step); + // This *creates* a Run step in the build graph, to be executed when another // step is evaluated that depends on it. The next line below will establish // such a dependency.