summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/nvcc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules/core/tools/nvcc.lua')
-rw-r--r--xmake/modules/core/tools/nvcc.lua12
1 files changed, 9 insertions, 3 deletions
diff --git a/xmake/modules/core/tools/nvcc.lua b/xmake/modules/core/tools/nvcc.lua
index 604fbe505..127f51656 100644
--- a/xmake/modules/core/tools/nvcc.lua
+++ b/xmake/modules/core/tools/nvcc.lua
@@ -171,9 +171,15 @@ function nf_optimize(self, level)
end
-- make vs runtime flag
-function nf_runtime(self, vs_runtime)
- if self:is_plat("windows") and vs_runtime then
- return '-Xcompiler "-' .. vs_runtime .. '"'
+function nf_runtime(self, runtime)
+ if self:is_plat("windows") and runtime then
+ local maps = {
+ MT = '-Xcompiler "-MT"',
+ MD = '-Xcompiler "-MD"',
+ MTd = '-Xcompiler "-MTd"',
+ MDd = '-Xcompiler "-MDd"'
+ }
+ return maps[runtime]
end
end