diff options
| author | ruki <[email protected]> | 2021-01-05 22:43:53 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-01-05 22:43:53 +0800 |
| commit | bc9843056d93f1ccc6717763f1bbd98f6f23e6c7 (patch) | |
| tree | 01ec8c345673c2d8d45ff889511ab71d48af8317 | |
| parent | 54a7c467ad4afd46a1ae38b5bbfad526c674766f (diff) | |
add NDEBUG for release mode
| -rw-r--r-- | xmake/rules/mode/xmake.lua | 12 |
1 files changed, 12 insertions, 0 deletions
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) |
