Added support for csversion API to dotnet toolset.

This commit is contained in:
Joao Matos 2019-02-18 12:37:21 +00:00
parent cda4f94e28
commit d0ab1edf67
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