summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/nvcc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules/core/tools/nvcc.lua')
-rw-r--r--xmake/modules/core/tools/nvcc.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/xmake/modules/core/tools/nvcc.lua b/xmake/modules/core/tools/nvcc.lua
index 592634ac8..e72857a93 100644
--- a/xmake/modules/core/tools/nvcc.lua
+++ b/xmake/modules/core/tools/nvcc.lua
@@ -29,11 +29,17 @@ import("private.tools.nvcc.parse_deps")
-- init it
function init(self)
- -- init flags
- if not is_plat("windows") then
+ -- init cuflags
+ if not is_plat("windows", "mingw") then
self:set("shared.cuflags", "-Xcompiler -fPIC")
end
+ -- add -ccbin
+ local cu_ccbin = get_config("cu-ccbin")
+ if cu_ccbin then
+ self:add("cuflags", "-ccbin=" .. os.args(cu_ccbin))
+ end
+
-- init flags map
self:set("mapflags",
{