mirror of
https://github.com/nine-lives-later/zzmq.git
synced 2024-09-29 04:48:46 +08:00
7db33e0141
Add docker ignore file Add auto-update to building of examples
26 lines
656 B
Zig
26 lines
656 B
Zig
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 = b.path("src/zzmq.zig"),
|
|
});
|
|
|
|
const lib_test = b.addTest(.{
|
|
.root_source_file = b.path("src/zzmq.zig"),
|
|
.target = target,
|
|
.optimize = optimize,
|
|
});
|
|
|
|
lib_test.linkSystemLibrary("zmq");
|
|
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);
|
|
}
|