diff options
| -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 = .{ .src_path = .{ .owner = b, .sub_path = "clap.zig" } } }); | 4 | const clap_mod = b.addModule("clap", .{ .root_source_file = b.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 = .{ .src_path = .{ .owner = b, .sub_path = "clap.zig" } }, | 11 | .root_source_file = b.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 = .{ .src_path = .{ .owner = b, .sub_path = b.fmt("example/{s}.zig", .{example_name}) } }, | 28 | .root_source_file = b.path(b.fmt("example/{s}.zig", .{example_name})), |
| 29 | .target = target, | 29 | .target = target, |
| 30 | .optimize = optimize, | 30 | .optimize = optimize, |
| 31 | }); | 31 | }); |