From bc9843056d93f1ccc6717763f1bbd98f6f23e6c7 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 5 Jan 2021 22:43:53 +0800 Subject: add NDEBUG for release mode --- xmake/rules/mode/xmake.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/xmake/rules/mode/xmake.lua b/xmake/rules/mode/xmake.lua index b4bcdfe71..2bdb9f689 100644 --- a/xmake/rules/mode/xmake.lua +++ b/xmake/rules/mode/xmake.lua @@ -62,6 +62,9 @@ rule("mode.release") if not target:get("strip") then target:set("strip", "all") end + + -- enable NDEBUG macros to disables standard-C assertions + target:add("cxflags", "-DNDEBUG") end end) @@ -90,6 +93,9 @@ rule("mode.releasedbg") if not target:get("strip") then target:set("strip", "all") end + + -- enable NDEBUG macros to disables standard-C assertions + target:add("cxflags", "-DNDEBUG") end end) @@ -114,6 +120,9 @@ rule("mode.minsizerel") if not target:get("strip") then target:set("strip", "all") end + + -- enable NDEBUG macros to disables standard-C assertions + target:add("cxflags", "-DNDEBUG") end end) @@ -142,6 +151,9 @@ rule("mode.profile") target:add("cxflags", "-pg") target:add("mxflags", "-pg") target:add("ldflags", "-pg") + + -- enable NDEBUG macros to disables standard-C assertions + target:add("cxflags", "-DNDEBUG") end end) -- cgit v1.3.1