Skip to content

Commit

Permalink
change from defineCMacro to addCMacro
Browse files Browse the repository at this point in the history
  • Loading branch information
zigster64 authored and jmcnamara committed Dec 24, 2024
1 parent 8206bda commit da3628d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub fn build(b: *std.Build) void {
else => lib.root_module.strip = true,
}
if (tests)
lib.defineCMacro("TESTING", null);
lib.root_module.addCMacro("TESTING", "");
lib.addCSourceFiles(.{
.files = &.{
"src/vml.c",
Expand Down Expand Up @@ -107,7 +107,7 @@ pub fn build(b: *std.Build) void {
.flags = cflags,
})
else
lib.defineCMacro("USE_STANDARD_TMPFILE", null);
lib.root_module.addCMacro("USE_STANDARD_TMPFILE", "");

lib.addIncludePath(b.path("include"));
lib.addIncludePath(b.path("third_party"));
Expand Down Expand Up @@ -283,7 +283,7 @@ fn buildTest(b: *std.Build, info: BuildInfo) void {
.optimize = info.lib.root_module.optimize.?,
.target = info.lib.root_module.resolved_target.?,
});
exe.defineCMacro("TESTING", null);
exe.root_module.addCMacro("TESTING", "");
exe.addCSourceFile(.{
.file = b.path(info.path),
.flags = cflags,
Expand Down

0 comments on commit da3628d

Please sign in to comment.