Skip to content

Commit

Permalink
Use b.path + add .zig-cache to .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
malcolmstill committed Jun 15, 2024
1 parent 4b54931 commit affa53c
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ bin/

zig-cache/
zig-out/
.zig-cache/

inject.sh

Expand Down
6 changes: 3 additions & 3 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ pub fn build(b: *std.Build) void {

const lib = b.addStaticLibrary(.{
.name = "zig-amqp",
.root_source_file = .{ .path = "src/amqp.zig" },
.root_source_file = b.path("src/amqp.zig"),
.target = target,
.optimize = optimize,
});
b.installArtifact(lib);

_ = b.addModule("amqp", .{
.root_source_file = .{ .path = "src/amqp.zig" },
.root_source_file = b.path("src/amqp.zig"),
.target = target,
.optimize = optimize,
});

const main_tests = b.addTest(.{
.root_source_file = .{ .path = "src/amqp.zig" },
.root_source_file = b.path("src/amqp.zig"),
.target = target,
.optimize = optimize,
});
Expand Down
2 changes: 1 addition & 1 deletion examples/simple_consume/build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub fn build(b: *std.Build) void {

const exe = b.addExecutable(.{
.name = "simple_consume",
.root_source_file = .{ .path = "src/main.zig" },
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
Expand Down
2 changes: 1 addition & 1 deletion examples/simple_consume_two_channels/build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub fn build(b: *std.Build) void {

const exe = b.addExecutable(.{
.name = "simple_consume",
.root_source_file = .{ .path = "src/main.zig" },
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
Expand Down
2 changes: 1 addition & 1 deletion examples/simple_publish/build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub fn build(b: *std.Build) void {

const exe = b.addExecutable(.{
.name = "simple_consume",
.root_source_file = .{ .path = "src/main.zig" },
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
Expand Down
2 changes: 1 addition & 1 deletion examples/simple_publish_single/build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub fn build(b: *std.Build) void {

const exe = b.addExecutable(.{
.name = "simple_consume",
.root_source_file = .{ .path = "src/main.zig" },
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
Expand Down

0 comments on commit affa53c

Please sign in to comment.