this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at aae38607253921cbee037280cf327a6d956a2cfb 51 lines 1.4 kB view raw
1const std = @import("std"); 2 3pub fn build(b: *std.Build) void { 4 const target = b.standardTargetOptions(.{}); 5 const optimize = b.standardOptimizeOption(.{}); 6 7 const mod = b.addModule("aether", .{ 8 .root_source_file = b.path("src/root.zig"), 9 .target = target, 10 }); 11 12 const mod_exe = b.createModule(.{ 13 .root_source_file = b.path("src/main.zig"), 14 .target = target, 15 .optimize = optimize, 16 .imports = &.{ 17 .{ .name = "aether", .module = mod }, 18 }, 19 }); 20 21 const exe = b.addExecutable(.{ 22 .name = "aether", 23 .root_module = mod_exe, 24 }); 25 26 b.installArtifact(exe); 27 28 const run_step = b.step("run", "Run the app"); 29 30 const run_cmd = b.addRunArtifact(exe); 31 run_step.dependOn(&run_cmd.step); 32 33 run_cmd.step.dependOn(b.getInstallStep()); 34 35 if (b.args) |args| { 36 run_cmd.addArgs(args); 37 } 38 39 const test_step = b.step("test", "Run tests"); 40 addTest(b, test_step, mod, "aether"); 41 addTest(b, test_step, mod_exe, "aether-exe"); 42} 43 44fn addTest(b: *std.Build, step: *std.Build.Step, mod: *std.Build.Module, name: ?[]const u8) void { 45 const mod_tests = b.addTest(.{ 46 .root_module = mod, 47 .name = if (name) |n| n else "test", 48 }); 49 const run_mod_tests = b.addRunArtifact(mod_tests); 50 step.dependOn(&run_mod_tests.step); 51}