-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.zig
More file actions
51 lines (42 loc) · 1.45 KB
/
build.zig
File metadata and controls
51 lines (42 loc) · 1.45 KB
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
47
48
49
50
51
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const single_threaded = b.option(bool, "single-threaded", "Enable or disable threading support");
const closure = b.dependency("closure", .{
.target = target,
.optimize = optimize,
});
const scalarcore = b.dependency("scalarcore", .{
.target = target,
.optimize = optimize,
});
const module = b.addModule("datapipes", .{
.root_source_file = b.path("lib/datapipes.zig"),
.target = target,
.optimize = optimize,
.single_threaded = single_threaded,
.imports = &.{
.{
.name = "closure",
.module = closure.module("closure"),
},
.{
.name = "scalarcore",
.module = scalarcore.module("scalarcore"),
},
},
});
const module_tests = b.addTest(.{
.root_module = module,
});
const run_module_tests = b.addRunArtifact(module_tests);
const doc_step = b.step("docs", "Generate documentation");
doc_step.dependOn(&b.addInstallDirectory(.{
.source_dir = module_tests.getEmittedDocs(),
.install_dir = .prefix,
.install_subdir = "docs/datapipes",
}).step);
const test_step = b.step("test", "Run tests");
test_step.dependOn(&run_module_tests.step);
}