mirror of
https://github.com/nine-lives-later/zzmq.git
synced 2024-09-29 12:48:47 +08:00
26 lines
662 B
Zig
26 lines
662 B
Zig
|
const std = @import("std");
|
||
|
|
||
|
pub fn build(b: *std.Build) !void {
|
||
|
const target = b.standardTargetOptions(.{});
|
||
|
const optimize = b.standardOptimizeOption(.{});
|
||
|
|
||
|
_ = b.addModule("zzmq", .{
|
||
|
.source_file = .{ .path = "src/zzmq.zig" },
|
||
|
});
|
||
|
|
||
|
const lib_test = b.addTest(.{
|
||
|
.root_source_file = .{ .path = "src/zzmq.zig" },
|
||
|
.target = target,
|
||
|
.optimize = optimize,
|
||
|
});
|
||
|
|
||
|
lib_test.linkSystemLibrary("czmq");
|
||
|
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);
|
||
|
}
|