Browse Source

Create projects which always build generated code

This ensures local test runs are always reliable because every time the solution is built the generated code is updated.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/1473/head
Dimitar Dobrev 5 years ago
parent
commit
1178ce4055
  1. 29
      build/Tests.lua

29
build/Tests.lua

@ -1,5 +1,34 @@ @@ -1,5 +1,34 @@
-- Tests/examples helpers
require('vstudio')
function disableFastUpToDateCheck(prj, cfg)
premake.vstudio.vc2010.element("DisableFastUpToDateCheck", nil, "true")
end
premake.override(premake.vstudio.cs2005.elements, "projectProperties",
function(oldfn, prj)
local elements = oldfn(prj)
if (string.endswith(prj.filename, ".CSharp") and
not string.endswith(prj.filename, ".Tests.CSharp") and
not string.endswith(prj.filename, ".Parser.CSharp")) then
elements = table.join(elements, {disableFastUpToDateCheck})
end
return elements
end)
premake.override(premake.vstudio.vc2010.elements, "globals",
function(oldfn, prj, cfg)
local elements = oldfn(prj, cfg)
if (string.endswith(prj.filename, ".CLI") and
not string.endswith(prj.filename, ".Tests.CLI") and
not string.endswith(prj.filename, ".Parser.CLI") and
prj.filename ~= "CppSharp.CLI") then
elements = table.join(elements, {disableFastUpToDateCheck})
end
return elements
end)
function SetupExampleProject()
kind "ConsoleApp"
language "C#"

Loading…
Cancel
Save