diff options
| author | 2024-05-16 10:26:44 +1000 | |
|---|---|---|
| committer | 2024-05-16 09:36:47 +0200 | |
| commit | 03b833385bb970928cc94c4da66d818893642830 (patch) | |
| tree | d3d4de16f452bcd254f8f2fff0db5e51ee65b2bf | |
| parent | Remove zig.mod (diff) | |
| download | zig-clap-03b833385bb970928cc94c4da66d818893642830.tar.gz zig-clap-03b833385bb970928cc94c4da66d818893642830.tar.xz zig-clap-03b833385bb970928cc94c4da66d818893642830.zip | |
Updated `build.zig` to support Zig 0.13.0-dev.211+6a65561e3
| -rw-r--r-- | build.zig | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -1,14 +1,14 @@ | |||
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | 2 | ||
| 3 | pub fn build(b: *std.Build) void { | 3 | pub fn build(b: *std.Build) void { |
| 4 | const clap_mod = b.addModule("clap", .{ .root_source_file = .{ .path = "clap.zig" } }); | 4 | const clap_mod = b.addModule("clap", .{ .root_source_file = .{ .src_path = .{ .owner = b, .sub_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(.{}); |
| 8 | 8 | ||
| 9 | const test_step = b.step("test", "Run all tests in all modes."); | 9 | const test_step = b.step("test", "Run all tests in all modes."); |
| 10 | const tests = b.addTest(.{ | 10 | const tests = b.addTest(.{ |
| 11 | .root_source_file = .{ .path = "clap.zig" }, | 11 | .root_source_file = .{ .src_path = .{ .owner = b, .sub_path = "clap.zig" } }, |
| 12 | .target = target, | 12 | .target = target, |
| 13 | .optimize = optimize, | 13 | .optimize = optimize, |
| 14 | }); | 14 | }); |
| @@ -25,7 +25,7 @@ pub fn build(b: *std.Build) void { | |||
| 25 | }) |example_name| { | 25 | }) |example_name| { |
| 26 | const example = b.addExecutable(.{ | 26 | const example = b.addExecutable(.{ |
| 27 | .name = example_name, | 27 | .name = example_name, |
| 28 | .root_source_file = .{ .path = b.fmt("example/{s}.zig", .{example_name}) }, | 28 | .root_source_file = .{ .src_path = .{ .owner = b, .sub_path = b.fmt("example/{s}.zig", .{example_name}) } }, |
| 29 | .target = target, | 29 | .target = target, |
| 30 | .optimize = optimize, | 30 | .optimize = optimize, |
| 31 | }); | 31 | }); |