Skip to content

Commit

Permalink
Use FLECS_NDEBUG instead of NDEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
BeanCheeseBurrito committed Jul 29, 2024
1 parent a891a32 commit ec3afc9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Flecs.NET.Native/build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ pub fn compileFlecs(options: anytype, b: *Build, lib_type: LibType) void {
lib.addCSourceFile(.{ .file = b.path("../../submodules/flecs/flecs.c"), .flags = &.{} });
lib.linkLibC();

if (options.optimize != .Debug) {
lib.defineCMacro("NDEBUG", null);
if (options.optimize == .Debug) {
lib.defineCMacro("FLECS_DEBUG", null);
} else {
lib.defineCMacro("FLECS_NDEBUG", null);
}

if (options.soft_assert) {
Expand Down

0 comments on commit ec3afc9

Please sign in to comment.