summaryrefslogtreecommitdiff
path: root/xmake/rules/cuda/gencodes/xmake.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-06-09 23:15:08 +0800
committerruki <[email protected]>2019-06-09 23:15:08 +0800
commit60ddb4c5a6725d11a7821d691dfd53c23df282bc (patch)
tree2cbce0fbb1afc08141761e18699fc23407b3f519 /xmake/rules/cuda/gencodes/xmake.lua
parent7a8d81f043060ace914fc13f3ca914419605ab27 (diff)
improve to the device link for cuda
Diffstat (limited to 'xmake/rules/cuda/gencodes/xmake.lua')
-rw-r--r--xmake/rules/cuda/gencodes/xmake.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/xmake/rules/cuda/gencodes/xmake.lua b/xmake/rules/cuda/gencodes/xmake.lua
index d7dedb197..1cd92fa5a 100644
--- a/xmake/rules/cuda/gencodes/xmake.lua
+++ b/xmake/rules/cuda/gencodes/xmake.lua
@@ -117,11 +117,15 @@ rule("cuda.gencodes")
end
end
- for _, v in ipairs(target:values("cuda.gencode")) do
+ local cugencodes = table.wrap(target:get("cugencodes"))
+ for _, opt in ipairs(target:orderopts()) do
+ table.join2(gencodes, opt:get("cugencodes"))
+ end
+ for _, v in ipairs(cugencodes) do
local flag = nf_cugencode(v)
if flag then
target:add('cuflags', flag)
- target:add('ldflags', flag)
+ target:add('culdflags', flag)
end
end
end)