summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Krzysztof Wolicki2024-01-05 12:08:48 +0100
committerGravatar Komari Spaghetti2024-01-05 13:35:13 +0100
commit6aa5180eeadde1475359dea355ce3df534e4ab4b (patch)
tree9ae0c597580a958e904049d17f6daaf24d48714c
parentAdd autodoc website (diff)
downloadzig-clap-6aa5180eeadde1475359dea355ce3df534e4ab4b.tar.gz
zig-clap-6aa5180eeadde1475359dea355ce3df534e4ab4b.tar.xz
zig-clap-6aa5180eeadde1475359dea355ce3df534e4ab4b.zip
Update to latest master
-rw-r--r--build.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/build.zig b/build.zig
index ead9282..53e5f90 100644
--- a/build.zig
+++ b/build.zig
@@ -1,7 +1,7 @@
1const std = @import("std"); 1const std = @import("std");
2 2
3pub fn build(b: *std.Build) void { 3pub fn build(b: *std.Build) void {
4 const clap_mod = b.addModule("clap", .{ .source_file = .{ .path = "clap.zig" } }); 4 const clap_mod = b.addModule("clap", .{ .root_source_file = .{ .path = "clap.zig" } });
5 5
6 const optimize = b.standardOptimizeOption(.{}); 6 const optimize = b.standardOptimizeOption(.{});
7 const target = b.standardTargetOptions(.{}); 7 const target = b.standardTargetOptions(.{});
@@ -30,7 +30,7 @@ pub fn build(b: *std.Build) void {
30 .optimize = optimize, 30 .optimize = optimize,
31 }); 31 });
32 const install_example = b.addInstallArtifact(example, .{}); 32 const install_example = b.addInstallArtifact(example, .{});
33 example.addModule("clap", clap_mod); 33 example.root_module.addImport("clap", clap_mod);
34 example_step.dependOn(&example.step); 34 example_step.dependOn(&example.step);
35 example_step.dependOn(&install_example.step); 35 example_step.dependOn(&install_example.step);
36 } 36 }
@@ -57,13 +57,13 @@ pub fn build(b: *std.Build) void {
57} 57}
58 58
59fn readMeStep(b: *std.Build) *std.Build.Step { 59fn readMeStep(b: *std.Build) *std.Build.Step {
60 const s = b.allocator.create(std.build.Step) catch unreachable; 60 const s = b.allocator.create(std.Build.Step) catch unreachable;
61 s.* = std.build.Step.init(.{ 61 s.* = std.Build.Step.init(.{
62 .id = .custom, 62 .id = .custom,
63 .name = "ReadMeStep", 63 .name = "ReadMeStep",
64 .owner = b, 64 .owner = b,
65 .makeFn = struct { 65 .makeFn = struct {
66 fn make(step: *std.build.Step, _: *std.Progress.Node) anyerror!void { 66 fn make(step: *std.Build.Step, _: *std.Progress.Node) anyerror!void {
67 @setEvalBranchQuota(10000); 67 @setEvalBranchQuota(10000);
68 _ = step; 68 _ = step;
69 const file = try std.fs.cwd().createFile("README.md", .{}); 69 const file = try std.fs.cwd().createFile("README.md", .{});