summaryrefslogtreecommitdiff
path: root/xmake/rules/cuda/gencodes/xmake.lua
diff options
context:
space:
mode:
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)