Skip to content

Commit 75886c7

Browse files
committed
linkCpp on C++ test executables
1 parent ee49a2b commit 75886c7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

build.zig

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ pub fn build(b: *std.Build) void {
6464
.strip = strip,
6565
});
6666
test_exe.addCSourceFile(.{ .file = upstream.path("test").path(b, sub_path) });
67+
if (std.mem.eql(u8, std.fs.path.extension(sub_path), ".cpp")) test_exe.linkLibCpp();
6768
test_exe.linkLibrary(nfd);
6869

6970
install_tests_step.dependOn(&b.addInstallArtifact(test_exe, .{}).step);

0 commit comments

Comments
 (0)