From ea85b72f80bc9f37e0c2080912309125d3175811 Mon Sep 17 00:00:00 2001 From: Mathias Magnusson Date: Sat, 14 Dec 2024 14:37:25 +0100 Subject: aoc2024: add step to get binary for one day & part --- aoc24/build.zig | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'aoc24/build.zig') diff --git a/aoc24/build.zig b/aoc24/build.zig index 7a2c24b..b8f890b 100644 --- a/aoc24/build.zig +++ b/aoc24/build.zig @@ -57,10 +57,9 @@ pub fn build(b: *std.Build) void { .optimize = optimize, }); - // This declares intent for the executable to be installed into the - // standard location when the user invokes the "install" step (the default - // step when running `zig build`). - b.installArtifact(exe); + const install_artifact = b.addInstallArtifact(exe, .{}); + const install_step = b.step(b.fmt("{s}-install", .{name}), b.fmt("Install {s} to the output directory", .{name})); + install_step.dependOn(&install_artifact.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 -- cgit v1.2.3