Browse Source

Improved premake scripts for tests.

pull/408/head
Pyry Kontio 10 years ago
parent
commit
c6c9bc4c2f
  1. 17
      build/Tests.lua
  2. 6
      tests/NamespacesDerived/premake4.lua

17
build/Tests.lua

@ -38,7 +38,7 @@ function SetupManagedTestProject() @@ -38,7 +38,7 @@ function SetupManagedTestProject()
SetupManagedProject()
end
function SetupTestGeneratorProject(name)
function SetupTestGeneratorProject(name, depends)
project(name .. ".Gen")
SetupManagedTestProject()
kind "ConsoleApp"
@ -47,14 +47,19 @@ function SetupTestGeneratorProject(name) @@ -47,14 +47,19 @@ function SetupTestGeneratorProject(name)
dependson { name .. ".Native" }
links
{
linktable = {
"System.Core",
"CppSharp.AST",
"CppSharp.Generator",
"CppSharp.Generator.Tests"
"CppSharp.Generator.Tests",
}
if depends ~= nil then
table.insert(linktable, depends .. ".Gen")
end
links(linktable)
SetupParser()
end
@ -84,7 +89,7 @@ function SetupTestNativeProject(name, depends) @@ -84,7 +89,7 @@ function SetupTestNativeProject(name, depends)
files { "**.h", "**.cpp" }
if depends ~= nil then
links { depends }
links { depends .. ".Native" }
end
end
@ -117,7 +122,7 @@ function SetupTestProjectsCSharp(name, depends) @@ -117,7 +122,7 @@ function SetupTestProjectsCSharp(name, depends)
linktable = { "CppSharp.Runtime" }
if depends ~= nil then
table.insert(linktable, depends)
table.insert(linktable, depends .. ".CSharp")
end
links(linktable)

6
tests/NamespacesDerived/premake4.lua

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
group "Tests/Namespaces"
SetupTestGeneratorProject("NamespacesDerived")
SetupTestNativeProject("NamespacesDerived", "NamespacesBase.Native")
SetupTestProjectsCSharp("NamespacesDerived", "NamespacesBase.CSharp")
SetupTestGeneratorProject("NamespacesDerived", "NamespacesBase")
SetupTestNativeProject("NamespacesDerived", "NamespacesBase")
SetupTestProjectsCSharp("NamespacesDerived", "NamespacesBase")
Loading…
Cancel
Save