summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpportunityLiu <[email protected]>2019-05-20 19:41:34 +0800
committerOpportunityLiu <[email protected]>2019-05-20 19:43:29 +0800
commit9f0d35366cfbbe8c49cf645be0e430c469a77b3e (patch)
tree7a4cf2bced50cb3be58d19be158e208bc0695be4
parent814b8c684bbd367c9cf0643309983d27aa665840 (diff)
tool
-rw-r--r--xmake/modules/core/tools/nvcc.lua12
1 files changed, 11 insertions, 1 deletions
diff --git a/xmake/modules/core/tools/nvcc.lua b/xmake/modules/core/tools/nvcc.lua
index b14ec8829..05afaf1b9 100644
--- a/xmake/modules/core/tools/nvcc.lua
+++ b/xmake/modules/core/tools/nvcc.lua
@@ -20,6 +20,7 @@
-- imports
import("core.base.option")
+import("core.tool.tool")
import("core.project.config")
import("core.project.project")
import("core.language.language")
@@ -78,8 +79,17 @@ function nf_warning(self, level)
, error = "-Werror"
}
+ local cu_cxx = config.get("cu-cxx")
+ local cu_cxx_tool = nil tool.load("cxx")
+ if is_plat("windows") or not cu_cxx then
+ cu_cxx_tool = tool.load("cxx")
+ elseif cu_cxx then
+ cu_cxx_tool = tool.load("cxx", cu_cxx)
+ end
+
+ local cu_cxx_tool_warning = cu_cxx_tool.nf_warning(level)
-- make it
- return maps[level]
+ return maps[level] .. ' -Xcompiler "' .. cu_cxx_tool_warning .. '" -Xlinker "' .. cu_cxx_tool_warning ..'"'
end
-- make the optimize flag