mirror of
https://codeberg.org/andyscott/advent-of-code.git
synced 2024-12-21 17:13:10 -05:00
2024: minor update to build.zig
This commit is contained in:
parent
1e3f01aef5
commit
efc1516acc
1 changed files with 5 additions and 5 deletions
|
@ -10,23 +10,23 @@ pub fn build(b: *std.Build) void {
|
|||
|
||||
var day: u8 = 1;
|
||||
while (day <= num_days) : (day += 1) {
|
||||
const str = b.fmt("day{d}", .{day});
|
||||
const file = b.fmt("{s}.zig", .{str});
|
||||
const name = b.fmt("day{d}", .{day});
|
||||
const file = b.fmt("{s}.zig", .{name});
|
||||
|
||||
const exe = b.addExecutable(.{
|
||||
.name = str,
|
||||
.name = name,
|
||||
.root_source_file = b.path(file),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
|
||||
const install_exe = b.addInstallArtifact(exe, .{});
|
||||
const install_step = b.step(b.fmt("install_{s}", .{str}), b.fmt("Install {s}", .{str}));
|
||||
const install_step = b.step(b.fmt("install_{s}", .{name}), b.fmt("Install {s}", .{name}));
|
||||
install_step.dependOn(&install_exe.step);
|
||||
install_all.dependOn(&install_exe.step);
|
||||
|
||||
const run_exe = b.addRunArtifact(exe);
|
||||
const run_step = b.step(b.fmt("run_{s}", .{str}), b.fmt("Run {s}", .{str}));
|
||||
const run_step = b.step(b.fmt("run_{s}", .{name}), b.fmt("Run {s}", .{name}));
|
||||
run_step.dependOn(&run_exe.step);
|
||||
run_all.dependOn(&run_exe.step);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue