diff options
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -8,21 +8,21 @@ pub fn build(b: *Builder) void { | |||
| 8 | const mode = b.standardReleaseOptions(); | 8 | const mode = b.standardReleaseOptions(); |
| 9 | 9 | ||
| 10 | const example_step = b.step("examples", "Build examples"); | 10 | const example_step = b.step("examples", "Build examples"); |
| 11 | inline for ([][]const u8{ | 11 | inline for ([_][]const u8{ |
| 12 | "comptime-clap", | 12 | "comptime-clap", |
| 13 | "streaming-clap", | 13 | "streaming-clap", |
| 14 | }) |example_name| { | 14 | }) |example_name| { |
| 15 | const example = b.addExecutable(example_name, "example/" ++ example_name ++ ".zig"); | 15 | const example = b.addExecutable(example_name, "example/" ++ example_name ++ ".zig"); |
| 16 | example.addPackagePath("clap", "index.zig"); | 16 | example.addPackagePath("clap", "clap.zig"); |
| 17 | example.setBuildMode(mode); | 17 | example.setBuildMode(mode); |
| 18 | example_step.dependOn(&example.step); | 18 | example_step.dependOn(&example.step); |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | const test_all_step = b.step("test", "Run all tests in all modes."); | 21 | const test_all_step = b.step("test", "Run all tests in all modes."); |
| 22 | inline for ([]Mode{ Mode.Debug, Mode.ReleaseFast, Mode.ReleaseSafe, Mode.ReleaseSmall }) |test_mode| { | 22 | inline for ([_]Mode{ Mode.Debug, Mode.ReleaseFast, Mode.ReleaseSafe, Mode.ReleaseSmall }) |test_mode| { |
| 23 | const mode_str = comptime modeToString(test_mode); | 23 | const mode_str = comptime modeToString(test_mode); |
| 24 | 24 | ||
| 25 | const tests = b.addTest("index.zig"); | 25 | const tests = b.addTest("clap.zig"); |
| 26 | tests.setBuildMode(test_mode); | 26 | tests.setBuildMode(test_mode); |
| 27 | tests.setNamePrefix(mode_str ++ " "); | 27 | tests.setNamePrefix(mode_str ++ " "); |
| 28 | 28 | ||