Skip to content

Commit

Permalink
use std.Build.path function instead of deprecated std.Build.LazyPath.…
Browse files Browse the repository at this point in the history
…path (#79)
  • Loading branch information
FObersteiner authored May 18, 2024
1 parent 1f0249e commit 0703615
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub fn build(b: *std.Build) void {
fn setupLibrary(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode) *std.Build.Step.Compile {
const lib = b.addStaticLibrary(.{
.name = "zbench",
.root_source_file = .{ .path = "zbench.zig" },
.root_source_file = b.path("zbench.zig"),
.target = target,
.optimize = optimize,
.version = version,
Expand All @@ -47,7 +47,7 @@ fn setupTesting(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.b
for (test_files) |test_file| {
const _test = b.addTest(.{
.name = test_file.name,
.root_source_file = .{ .path = test_file.path },
.root_source_file = b.path(test_file.path),
.target = target,
.optimize = optimize,
});
Expand All @@ -73,13 +73,13 @@ fn setupExamples(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
for (example_names) |example_name| {
const example = b.addTest(.{
.name = example_name,
.root_source_file = .{ .path = b.fmt("examples/{s}.zig", .{example_name}) },
.root_source_file = b.path(b.fmt("examples/{s}.zig", .{example_name})),
.target = target,
.optimize = optimize,
});
const install_example = b.addInstallArtifact(example, .{});
const zbench_mod = b.addModule("zbench", .{
.root_source_file = .{ .path = "zbench.zig" },
.root_source_file = b.path("zbench.zig"),
});
example.root_module.addImport("zbench", zbench_mod);
example_step.dependOn(&example.step);
Expand Down

0 comments on commit 0703615

Please sign in to comment.