xmake-io / xmake

🔥 A cross-platform build utility based on Lua
https://xmake.io
Apache License 2.0
9.87k stars 775 forks source link

release mode 中 NDEBUG 也应该为cuflags添加 #5632

Closed cherichy closed 1 week ago

cherichy commented 1 week ago

你在什么场景下需要该功能?

目前在rules/mode/xmake.lua中NDEBUG加在cxflags中,对cuda程序而言这个flag就没有作用

描述可能的解决方案

在target:add("cxflags", "-DNDEBUG")之后添加target:add("cuflags", "-DNDEBUG")

描述你认为的候选方案

No response

其他信息

No response

Issues-translate-bot commented 1 week ago

Bot detected the issue body's language is not English, translate it automatically.


Title: release mode NDEBUG should also be added for cuflags

In what scenario do you need this function?

Currently, NDEBUG is added to cxflags in rules/mode/xmake.lua. This flag has no effect on the cuda program.

Describe possible solutions

Add target:add("cuflags", "-DNDEBUG") after target:add("cxflags", "-DNDEBUG")

Describe your alternatives

No response

Other information

No response

waruqi commented 1 week ago

来个 pr 过来

Issues-translate-bot commented 1 week ago

Bot detected the issue body's language is not English, translate it automatically.


Come here for a pr