summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2019-06-11 00:29:12 +0800
committerruki <[email protected]>2019-06-10 20:55:16 +0800
commitf63112325a658b582b87428a1f78c7e89f3b074e (patch)
treead5ea6a99d414ddfa3e188264a48d4b05404ac7e
parentae6f488393e8c327a467761bfe09076b38a62d5f (diff)
rename --cu-cxx to --cu-ccbin
-rw-r--r--xmake/languages/cuda/xmake.lua2
-rw-r--r--xmake/platforms/linux/config.lua10
-rw-r--r--xmake/platforms/linux/load.lua7
-rw-r--r--xmake/platforms/macosx/config.lua10
-rw-r--r--xmake/platforms/macosx/load.lua7
5 files changed, 19 insertions, 17 deletions
diff --git a/xmake/languages/cuda/xmake.lua b/xmake/languages/cuda/xmake.lua
index 1949708e6..75b4bf5b8 100644
--- a/xmake/languages/cuda/xmake.lua
+++ b/xmake/languages/cuda/xmake.lua
@@ -139,7 +139,7 @@ language("cuda")
{
{category = "Cross Complation Configuration/Compiler Configuration" }
, {nil, "cu", "kv", nil, "The Cuda Compiler" }
- , {nil, "cu-cxx", "kv", nil, "The Cuda Host C++ Compiler" }
+ , {nil, "cu-ccbin", "kv", nil, "The Cuda Host C++ Compiler" }
, {category = "Cross Complation Configuration/Linker Configuration" }
, {nil, "cu-ld", "kv", nil, "The Cuda Linker" }
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
diff --git a/xmake/platforms/linux/load.lua b/xmake/platforms/linux/load.lua
index 184c2fa64..65761d0ac 100644
--- a/xmake/platforms/linux/load.lua
+++ b/xmake/platforms/linux/load.lua
@@ -86,9 +86,10 @@ function main(platform)
if cuda_dir then
platform:add("cuflags", "-I" .. os.args(path.join(cuda_dir, "include")))
end
- local cu_cxx = config.get("cu-cxx")
- if cu_cxx then
- platform:add("cuflags", "-ccbin", os.args(cu_cxx))
+ local cu_ccbin = config.get("cu-ccbin")
+ if cu_ccbin then
+ platform:add("cuflags", "-ccbin", os.args(cu_ccbin))
+ platform:add("cu-ldflags", "-ccbin", os.args(cu_ccbin))
end
end
diff --git a/xmake/platforms/macosx/config.lua b/xmake/platforms/macosx/config.lua
index 59ad2d7bb..d2eaa807d 100644
--- a/xmake/platforms/macosx/config.lua
+++ b/xmake/platforms/macosx/config.lua
@@ -60,13 +60,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, sc = sc, ["sc-ld"] = sc_ld, ["sc-sh"] = sc_sh,
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 = "clang", cross = cross}, "clang", "gcc")
@@ -133,7 +133,7 @@ function _toolchains()
cu:add("nvcc")
cu_ld:add("nvcc")
cu_sh:add("nvcc")
- cu_cxx:add("$(env CXX)", "$(env CC)", "clang", "gcc")
+ cu_ccbin:add("$(env CXX)", "$(env CC)", "clang", "gcc")
return toolchains
end
@@ -158,10 +158,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("macosx.toolchains." .. (config.get("arch") or os.arch()), _toolchains)
- check_toolchain(config, "cu-cxx", toolchains["cu-cxx"])
+ check_toolchain(config, "cu-ccbin", toolchains["cu-ccbin"])
end
end
end
diff --git a/xmake/platforms/macosx/load.lua b/xmake/platforms/macosx/load.lua
index 142d7997f..19c2182b9 100644
--- a/xmake/platforms/macosx/load.lua
+++ b/xmake/platforms/macosx/load.lua
@@ -97,9 +97,10 @@ function main(platform)
if cuda_dir then
platform:add("cuflags", "-I" .. os.args(path.join(cuda_dir, "include")))
end
- local cu_cxx = config.get("cu-cxx")
- if cu_cxx then
- platform:add("cuflags", "-ccbin", os.args(cu_cxx))
+ local cu_ccbin = config.get("cu-ccbin")
+ if cu_ccbin then
+ platform:add("cuflags", "-ccbin", os.args(cu_ccbin))
+ platform:add("cu-ldflags", "-ccbin", os.args(cu_ccbin))
end
end