From e98bcd58485a636dc897946f652be9067d37a9e0 Mon Sep 17 00:00:00 2001 From: OpportunityLiu Date: Wed, 17 Jul 2019 15:01:53 +0800 Subject: replace old sep --- xmake/plugins/project/vstudio/impl/vs201x.lua | 6 ++++++ xmake/plugins/project/vsxmake/getinfo.lua | 6 ++++++ xmake/plugins/project/vsxmake/vsxmake.lua | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/xmake/plugins/project/vstudio/impl/vs201x.lua b/xmake/plugins/project/vstudio/impl/vs201x.lua index 3ea83fac2..af0a18d0c 100644 --- a/xmake/plugins/project/vstudio/impl/vs201x.lua +++ b/xmake/plugins/project/vstudio/impl/vs201x.lua @@ -165,6 +165,9 @@ function _make_vsinfo_modes() local vsinfo_modes = {} local modes = option.get("modes") if modes then + if not modes:find("\"") then + modes = modes:gsub(",", path.envsep()) + end for _, mode in ipairs(path.splitenv(modes)) do table.insert(vsinfo_modes, mode:trim()) end @@ -181,6 +184,9 @@ function _make_vsinfo_archs() local vsinfo_archs = {} local archs = option.get("archs") if archs then + if not archs:find("\"") then + archs = archs:gsub(",", path.envsep()) + end for _, arch in ipairs(path.splitenv(archs)) do table.insert(vsinfo_archs, arch:trim()) end diff --git a/xmake/plugins/project/vsxmake/getinfo.lua b/xmake/plugins/project/vsxmake/getinfo.lua index 97e1e4961..ceb955b46 100644 --- a/xmake/plugins/project/vsxmake/getinfo.lua +++ b/xmake/plugins/project/vsxmake/getinfo.lua @@ -129,6 +129,9 @@ function _make_vsinfo_modes() local vsinfo_modes = {} local modes = option.get("modes") if modes then + if not modes:find("\"") then + modes = modes:gsub(",", path.envsep()) + end for _, mode in ipairs(path.splitenv(modes)) do table.insert(vsinfo_modes, mode:trim()) end @@ -145,6 +148,9 @@ function _make_vsinfo_archs() local vsinfo_archs = {} local archs = option.get("archs") if archs then + if not archs:find("\"") then + archs = archs:gsub(",", path.envsep()) + end for _, arch in ipairs(path.splitenv(archs)) do table.insert(vsinfo_archs, arch:trim()) end diff --git a/xmake/plugins/project/vsxmake/vsxmake.lua b/xmake/plugins/project/vsxmake/vsxmake.lua index 348138ed7..a3235f060 100644 --- a/xmake/plugins/project/vsxmake/vsxmake.lua +++ b/xmake/plugins/project/vsxmake/vsxmake.lua @@ -67,7 +67,7 @@ function _escape(str) str = str:sub(#("$(XmakeProjectDir)") + 1) end - str = (string.gsub(str, "[%%%$@'\";%?%*]", function (c) return assert(map[c]) end)) + str = (string.gsub(str, "[%%%$@';%?%*]", function (c) return assert(map[c]) end)) if has_prefix then str = "$(XmakeProjectDir)" .. str end -- cgit v1.3.1