-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.zig
24 lines (18 loc) · 826 Bytes
/
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
const std = @import("std");
const erbuild = @import("src/build.zig");
const erlDriverPkg = std.build.Pkg{
.name = "erl_driver",
.source = std.build.FileSource.relative("src/main.zig"),
};
pub fn build(b: *std.build.Builder) !void {
// Standard release options allow the person running `zig build` to select
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
const mode = b.standardReleaseOptions();
const example_driver = try erbuild.addErlangDriver(b, "example_drv", "example_driver/example_driver.zig");
example_driver.addPackage(erlDriverPkg);
example_driver.setBuildMode(mode);
const main_tests = b.addTest("src/port_driver.zig");
main_tests.setBuildMode(mode);
const test_step = b.step("test", "Run library tests");
test_step.dependOn(&main_tests.step);
}