2023-04-11 19:12:18 +02:00
|
|
|
const std = @import("std");
|
|
|
|
|
2023-04-21 16:13:20 +02:00
|
|
|
pub fn build(b: *std.Build) void {
|
|
|
|
const target = b.standardTargetOptions(.{});
|
2023-04-11 19:12:18 +02:00
|
|
|
|
2023-04-21 16:13:20 +02:00
|
|
|
const optimize = b.standardOptimizeOption(.{});
|
2023-04-11 19:12:18 +02:00
|
|
|
|
2023-04-23 14:12:56 +02:00
|
|
|
const lib = b.addStaticLibrary(.{
|
2023-04-21 16:13:20 +02:00
|
|
|
.name = "zerve",
|
2023-04-23 14:12:56 +02:00
|
|
|
.root_source_file = .{ .path = "src/zerve.zig" },
|
2023-04-21 16:13:20 +02:00
|
|
|
.target = target,
|
|
|
|
.optimize = optimize,
|
|
|
|
});
|
2023-04-11 19:12:18 +02:00
|
|
|
|
2023-04-23 14:12:56 +02:00
|
|
|
lib.install();
|
2023-04-21 16:13:20 +02:00
|
|
|
|
2023-04-23 14:12:56 +02:00
|
|
|
const main_tests = b.addTest(.{
|
|
|
|
.root_source_file = .{ .path = "src/zerve.zig" },
|
2023-04-21 16:13:20 +02:00
|
|
|
.target = target,
|
|
|
|
.optimize = optimize,
|
|
|
|
});
|
|
|
|
|
2023-04-23 14:12:56 +02:00
|
|
|
const test_step = b.step("test", "Run library tests");
|
|
|
|
test_step.dependOn(&main_tests.step);
|
2023-04-11 19:12:18 +02:00
|
|
|
}
|