Merge pull request #1247 from tritao/csversion_dotnet

Added support for `csversion` API to dotnet toolset.
This commit is contained in:
Samuel Surtees 2019-02-18 23:19:13 +10:00 committed by GitHub
commit 73f14baaba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View File

@ -294,6 +294,10 @@
table.insert(flags, table.implode(cfg.defines, "/d:", "", " "))
end
if cfg.csversion ~= nil then
table.insert(flags, '/langversion:' .. cfg.csversion)
end
return table.join(flags, cfg.buildoptions)
end

View File

@ -44,3 +44,14 @@
prepare()
test.isequal("mcs", dotnet.gettoolname(cfg, "csc"))
end
--
-- Check support for the `csversion` API
--
function suite.flags_csversion()
prepare()
csversion "7.2"
test.contains({ "/langversion:7.2" }, dotnet.getflags(cfg))
end