2024-02-17 19:09:22 +08:00
|
|
|
const std = @import("std");
|
|
|
|
|
|
|
|
pub fn build(b: *std.Build) !void {
|
|
|
|
const target = b.standardTargetOptions(.{});
|
|
|
|
const optimize = b.standardOptimizeOption(.{});
|
|
|
|
|
|
|
|
_ = b.addModule("zzmq", .{
|
2024-05-01 20:43:16 +08:00
|
|
|
.root_source_file = .{ .path = "src/zzmq.zig" },
|
2024-02-17 19:09:22 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
const lib_test = b.addTest(.{
|
|
|
|
.root_source_file = .{ .path = "src/zzmq.zig" },
|
|
|
|
.target = target,
|
|
|
|
.optimize = optimize,
|
|
|
|
});
|
|
|
|
|
2024-03-10 18:11:10 +08:00
|
|
|
lib_test.linkSystemLibrary("zmq");
|
2024-02-17 19:09:22 +08:00
|
|
|
lib_test.linkLibC();
|
|
|
|
|
|
|
|
const run_test = b.addRunArtifact(lib_test);
|
|
|
|
run_test.has_side_effects = true;
|
|
|
|
|
|
|
|
const test_step = b.step("test", "Run tests");
|
|
|
|
test_step.dependOn(&run_test.step);
|
|
|
|
}
|