diff options
| author | ruki <[email protected]> | 2019-06-12 00:39:26 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-06-11 21:56:41 +0800 |
| commit | 5cc9f406fb8d7815bb0ebed81b937876291ef81a (patch) | |
| tree | cc2387078bf8fe5004e488955b9e9e0f526210c3 /xmake/platforms/linux/config.lua | |
| parent | 3922367dec058b680fabc41f32e9b507822abe2b (diff) | |
| parent | 52f3bbe24e365b28f4bcd1e277d178a2561a1e8b (diff) | |
support cuda device-link
Diffstat (limited to 'xmake/platforms/linux/config.lua')
| -rw-r--r-- | xmake/platforms/linux/config.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xmake/platforms/linux/config.lua b/xmake/platforms/linux/config.lua index 60cc98676..4cbed376d 100644 --- a/xmake/platforms/linux/config.lua +++ b/xmake/platforms/linux/config.lua @@ -78,13 +78,13 @@ function _toolchains() local cu = toolchain("the cuda compiler") local cu_ld = toolchain("the cuda linker") local cu_sh = toolchain("the cuda shared library linker") - local cu_cxx = toolchain("the cuda host c++ compiler") + local cu_ccbin = toolchain("the cuda host c++ compiler") local toolchains = {cc = cc, cxx = cxx, as = as, ld = ld, sh = sh, ar = ar, ex = ex, mm = mm, mxx = mxx, gc = gc, ["gc-ld"] = gc_ld, ["gc-ar"] = gc_ar, dc = dc, ["dc-ld"] = dc_ld, ["dc-sh"] = dc_sh, ["dc-ar"] = dc_ar, rc = rc, ["rc-ld"] = rc_ld, ["rc-sh"] = rc_sh, ["rc-ar"] = rc_ar, - cu = cu, ["cu-ld"] = cu_ld, ["cu-sh"] = cu_sh, ["cu-cxx"] = cu_cxx} + cu = cu, ["cu-ld"] = cu_ld, ["cu-sh"] = cu_sh, ["cu-ccbin"] = cu_ccbin} -- init the c compiler cc:add("$(env CC)", {name = "gcc", cross = cross}, {name = "clang", cross = cross}) @@ -151,7 +151,7 @@ function _toolchains() cu_ld:add("nvcc") cu_sh:add("nvcc") if not cross or cross == "" then - cu_cxx:add("$(env CXX)", "$(env CC)", "gcc", "clang", "g++", "clang++") + cu_ccbin:add("$(env CXX)", "$(env CC)", "gcc", "clang", "g++", "clang++") end return toolchains @@ -174,10 +174,10 @@ function main(platform, name) -- check cuda check_cuda(config) - -- check cu-cxx after checking arch + -- check cu-ccbin after checking arch if config.get("cuda") then local toolchains = singleton.get("linux.toolchains", _toolchains) - check_toolchain(config, "cu-cxx", toolchains["cu-cxx"]) + check_toolchain(config, "cu-ccbin", toolchains["cu-ccbin"]) end end end |
