tadpole/engine/pkg/slugger/build.zig

27 lines
995 B
Zig

const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const lz4 = b.dependency("lz4", .{ .target = target, .optimize = optimize });
const xxd = b.dependency("xxd", .{ .target = target, .optimize = optimize });
const mod = b.addModule("slugger", .{
.root_source_file = b.path("src/slugger.zig"),
.target = target,
.optimize = optimize,
});
mod.addImport("lz4", lz4.module("lz4_zig"));
mod.addImport("xxd", xxd.module("xxd"));
const tests = b.addTest(.{
.root_module = mod,
.use_llvm = b.option(bool, "llvm", "Compile the tests with LLVM"),
.filters = b.option([]const []const u8, "test-filter", "Only run tests matching these filters") orelse &.{},
});
const run_tests = b.addRunArtifact(tests);
run_tests.addPassthruArgs();
b.step("test", "Run slugger tests").dependOn(&run_tests.step);
}