zzmq/build.zig

26 lines
666 B
Zig
Raw Normal View History

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", .{
.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,
});
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);
}