diff options
| author | OpportunityLiu <[email protected]> | 2019-06-18 08:28:35 +0800 |
|---|---|---|
| committer | OpportunityLiu <[email protected]> | 2019-06-18 08:28:35 +0800 |
| commit | 9c8b83a61fce275edd3808c54f36ba368378fa5d (patch) | |
| tree | 13c33fc09353745d706bfccbc7e7fba9531b24ce /xmake/modules/core/tools/nvcc.lua | |
| parent | 284857c1a43ce61a9f5433d88414e539f2bdc02a (diff) | |
Support clang as cuda compiler
Diffstat (limited to 'xmake/modules/core/tools/nvcc.lua')
| -rw-r--r-- | xmake/modules/core/tools/nvcc.lua | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/xmake/modules/core/tools/nvcc.lua b/xmake/modules/core/tools/nvcc.lua index 592634ac8..1ddcdc562 100644 --- a/xmake/modules/core/tools/nvcc.lua +++ b/xmake/modules/core/tools/nvcc.lua @@ -29,11 +29,20 @@ import("private.tools.nvcc.parse_deps") -- init it function init(self) - -- init flags + -- init culdflags + self:set("shared.culdflags", "-shared") + + -- init cuflags if not is_plat("windows") 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", { |
