summaryrefslogtreecommitdiff
path: root/xmake/plugins
diff options
context:
space:
mode:
authorruki <[email protected]>2020-12-27 21:51:28 +0800
committerruki <[email protected]>2020-12-27 21:51:28 +0800
commit1fa35fa2f41282eab7105c4c3415b4460e5d395b (patch)
treee97a77ed884561c5113c32223599593d4c171db1 /xmake/plugins
parent60e70b05cf1266ff688aec4fa97a85d7e45815fc (diff)
improve stdlang for vsxmake
Diffstat (limited to 'xmake/plugins')
-rw-r--r--xmake/plugins/project/vsxmake/getinfo.lua7
-rw-r--r--xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.cxx(filecxx)1
2 files changed, 3 insertions, 5 deletions
diff --git a/xmake/plugins/project/vsxmake/getinfo.lua b/xmake/plugins/project/vsxmake/getinfo.lua
index ff74a0f02..66c5ede9c 100644
--- a/xmake/plugins/project/vsxmake/getinfo.lua
+++ b/xmake/plugins/project/vsxmake/getinfo.lua
@@ -153,9 +153,9 @@ function _make_targetinfo(mode, arch, target)
-- save defines
targetinfo.defines = _make_arrs(_get_values_from_target(target, "defines"))
targetinfo.languages = _make_arrs(_get_values_from_target(target, "languages"))
- targetinfo.cxxlanguage = "stdcpp14" -- only for intellisense
- if targetinfo.languages:find("c++17", 1, true) or targetinfo.languages:find("cxx17", 1, true) then
- targetinfo.cxxlanguage = "stdcpp17"
+ if targetinfo.languages then
+ -- fix c++17 to cxx17 for Xmake.props
+ targetinfo.languages = targetinfo.languages:replace("c++", "cxx", {plain = true})
end
local flags = {}
for k, v in pairs(localcache.get("config", "options_" .. target:name())) do
@@ -346,7 +346,6 @@ function main(outputdir, vsinfo)
local targetinfo = _make_targetinfo(mode, arch, target)
_target._sub[mode][arch] = targetinfo
_target.sdkver = targetinfo.sdkver
- _target.cxxlanguage = targetinfo.cxxlanguage
-- save all sourcefiles and headerfiles
_target.sourcefiles = table.unique(table.join(_target.sourcefiles or {}, (target:sourcefiles())))
diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.cxx(filecxx) b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.cxx(filecxx)
index 854d1f52f..92a8b031f 100644
--- a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.cxx(filecxx)
+++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.cxx(filecxx)
@@ -1,4 +1,3 @@
<ClCompile Include="$(XmakeProjectDir)\#path#">
<CompileAs>CompileAsCpp</CompileAs>
- <LanguageStandard>#cxxlanguage#</LanguageStandard>
</ClCompile>