diff options
author | Mathias Magnusson <mathias@magnusson.space> | 2024-12-14 14:37:25 +0100 |
---|---|---|
committer | Mathias Magnusson <mathias@magnusson.space> | 2024-12-14 14:37:25 +0100 |
commit | ea85b72f80bc9f37e0c2080912309125d3175811 (patch) | |
tree | 1c922bfa59a471bc96a92262073e57fd4a9f8ac2 | |
parent | fac925790af8499be1b941420c1d212ef40cdc05 (diff) | |
download | programming-problem-solving-ea85b72f80bc9f37e0c2080912309125d3175811.tar.gz |
aoc2024: add step to get binary for one day & part
-rw-r--r-- | aoc24/build.zig | 7 |
1 files changed, 3 insertions, 4 deletions
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 |