Skip to content

Commit 849e2cd

Browse files
author
tanche
committed
update build.zig to be compliante with zig 0.15.0
1 parent 13f5426 commit 849e2cd

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

build.zig

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@ pub fn build(b: *std.Build) void {
55
const target = b.standardTargetOptions(.{});
66
const optimize = b.standardOptimizeOption(.{});
77

8-
const cpputest = b.addStaticLibrary(.{
8+
const cpputest = b.addLibrary(.{
99
.name = "CppUTest",
10-
.target = target,
11-
.optimize = optimize,
12-
.link_libc = true,
10+
.linkage = .static,
11+
.root_module = b.createModule(.{
12+
.target = target,
13+
.optimize = optimize,
14+
.link_libc = true,
15+
}),
1316
});
1417

1518
cpputest.addCSourceFiles(.{
@@ -21,11 +24,14 @@ pub fn build(b: *std.Build) void {
2124
cpputest.addIncludePath(cpputest_dep.path("include"));
2225
cpputest.linkLibCpp();
2326

24-
const cpputest_ext = b.addStaticLibrary(.{
27+
const cpputest_ext = b.addLibrary(.{
2528
.name = "CppUTestExt",
26-
.target = target,
27-
.optimize = optimize,
28-
.link_libc = true,
29+
.linkage = .static,
30+
.root_module = b.createModule(.{
31+
.target = target,
32+
.optimize = optimize,
33+
.link_libc = true,
34+
}),
2935
});
3036

3137
cpputest_ext.addCSourceFiles(.{

build.zig.zon

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
.{
2-
.name = "cpputest",
2+
.name = .cpputest,
33
.version = "4.0.0",
4+
.fingerprint = 0x14056b74d90fd358,
5+
.minimum_zig_version = "0.15.0",
46
.dependencies = .{
57
.cpputest = .{
68
.url = "https://github.com/cpputest/cpputest/archive/refs/tags/v4.0.tar.gz",

0 commit comments

Comments
 (0)