857935c3
Gregory Mullen
const std = @import("std");
857935c3
Gregory Mullen
857935c3
Gregory Mullen
pub fn build(b: *std.Build) void {
857935c3
Gregory Mullen
const target = b.standardTargetOptions(.{});
857935c3
Gregory Mullen
857935c3
Gregory Mullen
const optimize = b.standardOptimizeOption(.{});
857935c3
Gregory Mullen
b98e366f
Gregory Mullen
const mqtt = b.addModule("mqtt", .{
b98e366f
Gregory Mullen
.root_source_file = b.path("src/mqtt.zig"),
857935c3
Gregory Mullen
.target = target,
857935c3
Gregory Mullen
.optimize = optimize,
857935c3
Gregory Mullen
});
857935c3
Gregory Mullen
b98e366f
Gregory Mullen
_ = mqtt;
857935c3
Gregory Mullen
b98e366f
Gregory Mullen
// Restore when server works
b98e366f
Gregory Mullen
//b.installArtifact(mqtt);
b98e366f
Gregory Mullen
//const run_cmd = b.addRunArtifact(mqtt);
b98e366f
Gregory Mullen
//run_cmd.step.dependOn(b.getInstallStep());
857935c3
Gregory Mullen
b98e366f
Gregory Mullen
//if (b.args) |args| {
b98e366f
Gregory Mullen
// run_cmd.addArgs(args);
b98e366f
Gregory Mullen
//}
857935c3
Gregory Mullen
b98e366f
Gregory Mullen
//const run_step = b.step("run", "Run the app");
b98e366f
Gregory Mullen
//run_step.dependOn(&run_cmd.step);
857935c3
Gregory Mullen
857935c3
Gregory Mullen
const exe_unit_tests = b.addTest(.{
b98e366f
Gregory Mullen
.root_source_file = b.path("src/mqtt.zig"),
857935c3
Gregory Mullen
.target = target,
857935c3
Gregory Mullen
.optimize = optimize,
857935c3
Gregory Mullen
});
857935c3
Gregory Mullen
857935c3
Gregory Mullen
const run_exe_unit_tests = b.addRunArtifact(exe_unit_tests);
857935c3
Gregory Mullen
857935c3
Gregory Mullen
const test_step = b.step("test", "Run unit tests");
857935c3
Gregory Mullen
test_step.dependOn(&run_exe_unit_tests.step);
857935c3
Gregory Mullen
}