Browse Source

Added some helper build functions for tests and examples.

pull/1/head
triton 12 years ago
parent
commit
2930f1b939
  1. 17
      build/Helpers.lua
  2. 57
      build/Tests.lua
  3. 1
      build/premake4.lua

17
build/Helpers.lua

@ -58,20 +58,3 @@ function IncludeDir(dir) @@ -58,20 +58,3 @@ function IncludeDir(dir)
end
end
end
-- Examples helpers
function SetupExampleProject()
SetupNativeProjects()
location (path.join(builddir, "deps"))
end
function IncludeExamples()
print("Searching for examples...")
IncludeDir(examplesdir)
end
function IncludeTests()
print("Searching for tests...")
IncludeDir(testsdir)
end

57
build/Tests.lua

@ -0,0 +1,57 @@ @@ -0,0 +1,57 @@
-- Examples helpers
function SetupExampleProject()
SetupNativeProjects()
location (path.join(builddir, "deps"))
end
function SetupTestGeneratorProject(name, file)
project(name)
kind "ConsoleApp"
language "C#"
location "."
debugdir(path.join(examplesdir, name))
files { file }
links
{
path.join(depsdir, "cxxi", "build", action, "lib", "Bridge"),
path.join(depsdir, "cxxi", "build", action, "lib", "Generator"),
}
end
function SetupTestNativeProject(name, file)
project(name)
SetupNativeProject()
kind "SharedLib"
language "C++"
flags { common_flags }
files { file }
end
function SetupTestProject(name, file, lib)
project(name)
kind "ConsoleApp"
language "C#"
location "."
files { file }
links { lib }
end
function IncludeExamples()
print("Searching for examples...")
IncludeDir(examplesdir)
end
function IncludeTests()
print("Searching for tests...")
IncludeDir(testsdir)
end

1
build/premake4.lua

@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
-- and calls the build scripts of all the sub-projects.
dofile "Helpers.lua"
dofile "Tests.lua"
solution "Cxxi"

Loading…
Cancel
Save