summaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorGravatar Jimmi Holst Christensen2018-09-06 17:11:58 +0200
committerGravatar Jimmi Holst Christensen2018-09-06 17:11:58 +0200
commit5e1480a7a7537451f7196498ac2988bda8273a9b (patch)
tree2c85b66feeeeec1114d9dbe2608ef64f3ef5ee76 /build.zig
parentUpdated to use pass-by-value where possible (diff)
downloadzig-clap-5e1480a7a7537451f7196498ac2988bda8273a9b.tar.gz
zig-clap-5e1480a7a7537451f7196498ac2988bda8273a9b.tar.xz
zig-clap-5e1480a7a7537451f7196498ac2988bda8273a9b.zip
Removed the extended api. Refactored tests
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig42
1 files changed, 0 insertions, 42 deletions
diff --git a/build.zig b/build.zig
deleted file mode 100644
index 6ec8837..0000000
--- a/build.zig
+++ /dev/null
@@ -1,42 +0,0 @@
1const Builder = @import("std").build.Builder;
2
3pub fn build(b: *Builder) void {
4 const mode = b.standardReleaseOptions();
5
6 {
7 const example_step = b.step("examples", "Build all examples");
8 const examples = [][]const u8{};
9
10 b.default_step.dependOn(example_step);
11 inline for (examples) |example| {
12 comptime const path = "examples/" ++ example ++ ".zig";
13 const exe = b.addExecutable(example, path);
14 exe.setBuildMode(mode);
15 exe.addPackagePath("clap", "index.zig");
16
17 const step = b.step("build-" ++ example, "Build '" ++ path ++ "'");
18 step.dependOn(&exe.step);
19 example_step.dependOn(step);
20 }
21 }
22
23 {
24 const test_step = b.step("tests", "Run all tests");
25 const tests = [][]const u8{
26 "core",
27 "extended",
28 };
29
30 b.default_step.dependOn(test_step);
31 inline for (tests) |test_name| {
32 comptime const path = "tests/" ++ test_name ++ ".zig";
33 const t = b.addTest(path);
34 t.setBuildMode(mode);
35 //t.addPackagePath("clap", "index.zig");
36
37 const step = b.step("test-" ++ test_name, "Run test '" ++ test_name ++ "'");
38 step.dependOn(&t.step);
39 test_step.dependOn(step);
40 }
41 }
42}