summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpportunityLiu <[email protected]>2019-07-16 23:50:59 +0800
committerOpportunityLiu <[email protected]>2019-07-17 08:45:36 +0800
commitcc8285058df86891bac366fdeac8086efa23d48b (patch)
tree61777e32b25147f603086f5f6cef0614305a67b1
parent15c198bbeeabc8cd2a5196a7f2408d662214fb8c (diff)
use cudagdb for cuda programs
-rw-r--r--xmake/rules/cuda/env/xmake.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/xmake/rules/cuda/env/xmake.lua b/xmake/rules/cuda/env/xmake.lua
index d14ebaa75..58aa13c0f 100644
--- a/xmake/rules/cuda/env/xmake.lua
+++ b/xmake/rules/cuda/env/xmake.lua
@@ -78,3 +78,13 @@ rule("cuda.env")
target:add("includedirs", cuda.includedirs)
end)
+ before_run(function (target)
+ import("core.project.config")
+ import("lib.detect.find_tool")
+
+ local debugger = config.get("debugger")
+ if not debugger and find_tool("cudagdb") then
+ config.set("debugger", "cudagdb")
+ end
+ end)
+