use cudagdb for cuda programs
@@ -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)
+
