summaryrefslogtreecommitdiff
path: root/xmake/plugins
diff options
context:
space:
mode:
authorxq114 <[email protected]>2022-02-25 22:08:11 +0800
committerxq114 <[email protected]>2022-02-25 22:08:11 +0800
commitd80e793b39693e153ceae6e54691a380578bd2ed (patch)
tree661e2d487870e84248d4d05aef33d4d496a69b98 /xmake/plugins
parentfebb2851d49aafb5d54ae98cb81bae2bac852329 (diff)
support msvc style flags for nvcc
Diffstat (limited to 'xmake/plugins')
-rw-r--r--xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua
index 0a83e982b..1bdcc215c 100644
--- a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua
+++ b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua
@@ -517,7 +517,7 @@ function _make_source_options_cuda(vcxprojfile, flags, opt)
-- make Defines
local defstr = ""
for _, flag in ipairs(flags) do
- flag:gsub("%-D(.*)",
+ flag:gsub("[%-/]D(.*)",
function (def)
defstr = defstr .. vsutils.escape(def) .. ";"
end
@@ -527,10 +527,10 @@ function _make_source_options_cuda(vcxprojfile, flags, opt)
vcxprojfile:print("<Defines%s>%s</Defines>", condition, defstr)
-- make Include
- if flagstr:find("%-I") then
+ if flagstr:find("[%-/]I") then
local dirs = {}
for _, flag in ipairs(flags) do
- flag:gsub("%-I(.*)", function (dir) table.insert(dirs, vsutils.escape(dir)) end)
+ flag:gsub("[%-/]I(.*)", function (dir) table.insert(dirs, vsutils.escape(dir)) end)
end
if #dirs > 0 then
vcxprojfile:print("<Include%s>%s</Include>", condition, table.concat(dirs, ";"))