Browse Source

Fixed the tests build scripts.

pull/86/head
triton 12 years ago
parent
commit
847769a9d8
  1. 37
      build/Tests.lua

37
build/Tests.lua

@ -18,13 +18,21 @@ function SetupTestCSharp(name)
SetupTestProjectsCSharp(name) SetupTestProjectsCSharp(name)
end end
function SetupManagedTestProject()
kind "SharedLib"
language "C#"
flags { "Unsafe" }
local c = configuration "vs*"
location "."
configuration(c)
end
function SetupTestGeneratorProject(name) function SetupTestGeneratorProject(name)
project(name .. ".Gen") project(name .. ".Gen")
SetupManagedTestProject()
kind "ConsoleApp" kind "ConsoleApp"
language "C#"
location "."
files { name .. ".cs" } files { name .. ".cs" }
dependson { name .. ".Native" } dependson { name .. ".Native" }
@ -46,6 +54,7 @@ function SetupTestNativeProject(name)
project(name .. ".Native") project(name .. ".Native")
SetupNativeProject() SetupNativeProject()
kind "SharedLib" kind "SharedLib"
language "C++" language "C++"
@ -69,12 +78,8 @@ end
function SetupTestProjectsCSharp(name, file, lib) function SetupTestProjectsCSharp(name, file, lib)
project(name .. ".CSharp") project(name .. ".CSharp")
SetupManagedTestProject()
kind "SharedLib"
language "C#"
location "."
flags { "Unsafe" }
dependson { name .. ".Gen", name .. ".Native" } dependson { name .. ".Gen", name .. ".Native" }
SetupTestGeneratorBuildEvent(name) SetupTestGeneratorBuildEvent(name)
@ -86,23 +91,20 @@ function SetupTestProjectsCSharp(name, file, lib)
links { "CppSharp.Runtime" } links { "CppSharp.Runtime" }
project(name .. ".Tests.CSharp") project(name .. ".Tests.CSharp")
SetupManagedTestProject()
kind "SharedLib"
language "C#"
location "."
flags { "Unsafe" }
files { name .. ".Tests.cs" } files { name .. ".Tests.cs" }
links { name .. ".CSharp" } links { name .. ".CSharp" }
dependson { name .. ".Native" } dependson { name .. ".Native" }
LinkNUnit() LinkNUnit()
links { "CppSharp.Runtime" }
end end
function SetupTestProjectsCLI(name, file, lib) function SetupTestProjectsCLI(name, file, lib)
project(name .. ".CLI") project(name .. ".CLI")
SetupNativeProject() SetupNativeProject()
kind "SharedLib" kind "SharedLib"
language "C++" language "C++"
flags { "Managed" } flags { "Managed" }
@ -120,10 +122,7 @@ function SetupTestProjectsCLI(name, file, lib)
links { name .. ".Native" } links { name .. ".Native" }
project(name .. ".Tests.CLI") project(name .. ".Tests.CLI")
SetupManagedTestProject()
kind "SharedLib"
language "C#"
location "."
files { name .. ".Tests.cs" } files { name .. ".Tests.cs" }
links { name .. ".CLI" } links { name .. ".CLI" }

Loading…
Cancel
Save