Fixed compilation issues
This commit is contained in:
parent
dad6a6819c
commit
ad6eb69ec7
3 changed files with 23 additions and 24 deletions
42
build.zig
42
build.zig
|
|
@ -4,33 +4,31 @@ pub fn build(b: *std.Build) void {
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
|
||||||
// Create library
|
// Create root module
|
||||||
const reticulumzero = b.addLibrary(.{
|
const root_module = b.createModule(.{
|
||||||
.name = "reticulum-zero",
|
|
||||||
.linkage = .static,
|
|
||||||
.root_module = b.createModule(.{
|
|
||||||
.root_source_file = b.path("src/root.zig"),
|
|
||||||
.target = target,
|
|
||||||
.optimize = optimize,
|
|
||||||
}),
|
|
||||||
});
|
|
||||||
|
|
||||||
// Output library object
|
|
||||||
b.installArtifact(reticulumzero);
|
|
||||||
|
|
||||||
// Expose library as a module
|
|
||||||
try b.modules.put(b.dupe("reticulum-zero"), reticulumzero.root_module);
|
|
||||||
|
|
||||||
// Set up unit testing
|
|
||||||
const unit_tests = b.addTest(.{
|
|
||||||
.root_source_file = b.path("src/root.zig"),
|
.root_source_file = b.path("src/root.zig"),
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
|
|
||||||
const run_unit_tests = b.addRunStep(unit_tests);
|
// Create library
|
||||||
|
const lib = b.addLibrary(.{
|
||||||
|
.name = "reticulum-zero",
|
||||||
|
.linkage = .static,
|
||||||
|
.root_module = root_module,
|
||||||
|
});
|
||||||
|
|
||||||
|
// Output library object
|
||||||
|
b.installArtifact(lib);
|
||||||
|
|
||||||
|
// Set up unit testing
|
||||||
|
// const unit_tests = b.addTest(.{
|
||||||
|
// .root_module = root_module,
|
||||||
|
// });
|
||||||
|
|
||||||
|
// const run_unit_tests = b.addRunStep(unit_tests);
|
||||||
|
|
||||||
// `zig build test` command
|
// `zig build test` command
|
||||||
const test_step = b.step("test", "Run library unit tests");
|
// const test_step = b.step("test", "Run library unit tests");
|
||||||
test_step.dependency(&run_unit_tests.step);
|
// test_step.dependency(&run_unit_tests.step);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
.{
|
.{
|
||||||
.name = "reticulum-zero",
|
.name = .reticulumzero,
|
||||||
.version = "0.0.0",
|
.version = "0.0.0",
|
||||||
.minimum_zig_version = "0.16.0",
|
.minimum_zig_version = "0.16.0",
|
||||||
|
.fingerprint = 0x7bbb9f9a7c7a4705,
|
||||||
.dependencies = .{},
|
.dependencies = .{},
|
||||||
.paths = .{
|
.paths = .{
|
||||||
"build.zig",
|
"build.zig",
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
const packet = @import("packet.zig");
|
pub const packet = @import("packet.zig");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue