summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--build.zig7
2 files changed, 7 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index d8c8979..55f1256 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
1.zig-cache 1.zig-cache
2zig-out 2zig-out
3zig-cache
diff --git a/build.zig b/build.zig
index 0e35a04..ef4d191 100644
--- a/build.zig
+++ b/build.zig
@@ -1,4 +1,9 @@
1const std = @import("std"); 1const std = @import("std");
2const builtin = @import("builtin");
3
4const current_zig = builtin.zig_version;
5// NOTE: this is just for 12 compatible, when 14 release, we can remove this!
6const ProgressNode = if (current_zig.minor == 12) *std.Progress.Node else std.Progress.Node;
2 7
3pub fn build(b: *std.Build) void { 8pub fn build(b: *std.Build) void {
4 const clap_mod = b.addModule("clap", .{ .root_source_file = b.path("clap.zig") }); 9 const clap_mod = b.addModule("clap", .{ .root_source_file = b.path("clap.zig") });
@@ -63,7 +68,7 @@ fn readMeStep(b: *std.Build) *std.Build.Step {
63 .name = "ReadMeStep", 68 .name = "ReadMeStep",
64 .owner = b, 69 .owner = b,
65 .makeFn = struct { 70 .makeFn = struct {
66 fn make(step: *std.Build.Step, _: std.Progress.Node) anyerror!void { 71 fn make(step: *std.Build.Step, _: ProgressNode) anyerror!void {
67 @setEvalBranchQuota(10000); 72 @setEvalBranchQuota(10000);
68 _ = step; 73 _ = step;
69 const file = try std.fs.cwd().createFile("README.md", .{}); 74 const file = try std.fs.cwd().createFile("README.md", .{});