diff options
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 7 |
1 files changed, 6 insertions, 1 deletions
| @@ -1,4 +1,9 @@ | |||
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | ||
| 3 | |||
| 4 | const current_zig = builtin.zig_version; | ||
| 5 | // NOTE: this is just for 12 compatible, when 14 release, we can remove this! | ||
| 6 | const ProgressNode = if (current_zig.minor == 12) *std.Progress.Node else std.Progress.Node; | ||
| 2 | 7 | ||
| 3 | pub fn build(b: *std.Build) void { | 8 | pub 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", .{}); |