this repo has no description
at main 47 lines 1.1 kB view raw
1const std = @import("std"); 2 3pub fn build(b: *std.Build) void { 4 const target = b.standardTargetOptions(.{}); 5 6 const optimize = b.standardOptimizeOption(.{}); 7 8 const vaxis = b.dependency("vaxis", .{ 9 .target = target, 10 .optimize = optimize, 11 }); 12 13 const exe_mod = b.createModule(.{ 14 .root_source_file = b.path("src/main.zig"), 15 .target = target, 16 .optimize = optimize, 17 }); 18 19 exe_mod.addImport("vaxis", vaxis.module("vaxis")); 20 21 const exe = b.addExecutable(.{ 22 .name = "jjuice", 23 .root_module = exe_mod, 24 }); 25 26 b.installArtifact(exe); 27 28 const run_cmd = b.addRunArtifact(exe); 29 30 run_cmd.step.dependOn(b.getInstallStep()); 31 32 if (b.args) |args| { 33 run_cmd.addArgs(args); 34 } 35 36 const run_step = b.step("run", "Run the app"); 37 run_step.dependOn(&run_cmd.step); 38 39 const exe_unit_tests = b.addTest(.{ 40 .root_module = exe_mod, 41 }); 42 43 const run_exe_unit_tests = b.addRunArtifact(exe_unit_tests); 44 45 const test_step = b.step("test", "Run unit tests"); 46 test_step.dependOn(&run_exe_unit_tests.step); 47}