Browse Source

Improved premake scripts for tests.

pull/408/head
Pyry Kontio 11 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()
SetupManagedProject() SetupManagedProject()
end end
function SetupTestGeneratorProject(name) function SetupTestGeneratorProject(name, depends)
project(name .. ".Gen") project(name .. ".Gen")
SetupManagedTestProject() SetupManagedTestProject()
kind "ConsoleApp" kind "ConsoleApp"
@ -47,14 +47,19 @@ function SetupTestGeneratorProject(name)
dependson { name .. ".Native" } dependson { name .. ".Native" }
links linktable = {
{
"System.Core", "System.Core",
"CppSharp.AST", "CppSharp.AST",
"CppSharp.Generator", "CppSharp.Generator",
"CppSharp.Generator.Tests" "CppSharp.Generator.Tests",
} }
if depends ~= nil then
table.insert(linktable, depends .. ".Gen")
end
links(linktable)
SetupParser() SetupParser()
end end
@ -84,7 +89,7 @@ function SetupTestNativeProject(name, depends)
files { "**.h", "**.cpp" } files { "**.h", "**.cpp" }
if depends ~= nil then if depends ~= nil then
links { depends } links { depends .. ".Native" }
end end
end end
@ -117,7 +122,7 @@ function SetupTestProjectsCSharp(name, depends)
linktable = { "CppSharp.Runtime" } linktable = { "CppSharp.Runtime" }
if depends ~= nil then if depends ~= nil then
table.insert(linktable, depends) table.insert(linktable, depends .. ".CSharp")
end end
links(linktable) links(linktable)

6
tests/NamespacesDerived/premake4.lua

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