summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/nvcc.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-06-18 22:39:36 +0800
committerGitHub <[email protected]>2019-06-18 22:39:36 +0800
commit96bda12356f3d69edae33a31d384d28b1ef74274 (patch)
treefe35918e6ddb0cfdaca7b5333becf9b19c007a38 /xmake/modules/core/tools/nvcc.lua
parentb441b29b947c8d94c0642132383b4a7a67c189c9 (diff)
parent98d4504577b586ef2398346a0db2743081cf03a8 (diff)
Merge pull request #455 from OpportunityLiu/clang-cuda
Support clang as cuda compiler
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",
{