summaryrefslogtreecommitdiff
path: root/xmake/rules/cuda/xmake.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2024-02-22 00:58:20 +0800
committerruki <[email protected]>2024-02-22 00:58:20 +0800
commit2c97dacfe8490643fe6c8f488fea72350aa64945 (patch)
tree837d55cb521cbd4d7b09d320592376928681034c /xmake/rules/cuda/xmake.lua
parent76558d21fd3277f5f8d7c43c69d0b24f68ca4acd (diff)
improve ccbin #4755
Diffstat (limited to 'xmake/rules/cuda/xmake.lua')
-rw-r--r--xmake/rules/cuda/xmake.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/xmake/rules/cuda/xmake.lua b/xmake/rules/cuda/xmake.lua
index 543df54b8..334f569f1 100644
--- a/xmake/rules/cuda/xmake.lua
+++ b/xmake/rules/cuda/xmake.lua
@@ -23,6 +23,14 @@ rule("cuda.build")
set_sourcekinds("cu")
add_deps("cuda.build.devlink")
on_build_files("private.action.build.object", {batch = true})
+ on_config(function (target)
+ -- https://github.com/xmake-io/xmake/issues/4755
+ local cu_ccbin = target:tool("cu-ccbin")
+ if cu_ccbin then
+ target:add("cuflags", "-ccbin=" .. os.args(cu_ccbin), {force = true})
+ target:add("culdflags", "-ccbin=" .. os.args(cu_ccbin), {force = true})
+ end
+ end)
-- define rule: cuda
rule("cuda")