-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.zig
46 lines (40 loc) · 1.37 KB
/
build.zig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
const std = @import("std");
pub fn build(b: *std.Build) !void {
const zigcli_dep = b.dependency("zig-cli", .{ .target = b.host });
const zigcli_mod = zigcli_dep.module("zig-cli");
const indexer = b.addExecutable(.{
.name = "index",
.root_source_file = .{ .path = "src/prog_index.zig" },
.target = b.host,
.optimize = .ReleaseFast,
});
indexer.root_module.addImport("zig-cli", zigcli_mod);
b.installArtifact(indexer);
const daemon = b.addExecutable(.{
.name = "cocomel",
.root_source_file = .{ .path = "src/prog_cocomel.zig" },
.target = b.host,
.optimize = .ReleaseSafe,
});
b.installArtifact(daemon);
const search_client = b.addExecutable(.{
.name = "client",
.root_source_file = .{ .path = "src/prog_client.zig" },
.target = b.host,
.optimize = .ReleaseSafe,
});
b.installArtifact(search_client);
const search_cli = b.addExecutable(.{
.name = "search",
.root_source_file = .{ .path = "src/prog_search.zig" },
.target = b.host,
.optimize = .ReleaseSafe,
});
b.installArtifact(search_cli);
const test_step = b.step("test", "Run tests");
const unit_tests = b.addTest(.{
.root_source_file = .{ .path = "src/test.zig" },
.target = b.host,
});
test_step.dependOn(&unit_tests.step);
}