-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.zig
More file actions
31 lines (23 loc) · 793 Bytes
/
build.zig
File metadata and controls
31 lines (23 loc) · 793 Bytes
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
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const repl_mod = b.addModule("repl", .{
.root_source_file = b.path("repl.zig"),
.target = target,
.optimize = optimize,
});
const rg_dep = b.dependency("rg", .{
.target = target,
.optimize = optimize,
});
repl_mod.addImport("rg", rg_dep.module("rg"));
const repl_test = b.addTest(.{
.root_module = repl_mod,
});
const tests = b.step("test", "Run tests");
tests.dependOn(&b.addRunArtifact(repl_test).step);
const check = b.step("check", "Semantic analysis");
check.dependOn(&repl_test.step);
b.default_step.dependOn(check);
}