This repository has been archived by the owner on May 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpremake4.lua
88 lines (78 loc) · 2.35 KB
/
premake4.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
--oolua premake4 file
dofile("helper4.lua")
if _ACTION == "clean" then
os.rmdir("obj")
os.rmdir("bin")
os.rmdir("ipch")
end
solution("oolua")
configurations { "Debug", "Release" }
if os.is64bit() and _ACTION and _ACTION:match("^vs") then
platforms{"x86", "x64"}
end
dofile("./oolua4.lua")
dofile("./unit_tests/test.unit.lua")
include("./unit_tests/tests_may_fail/")
include("./profile/")
include("./unit_tests/string_is_integral/")
dofile("./unit_tests/test.unit.exceptions.lua")
dofile("./unit_tests/test.coverage.lua")
include("./unit_tests/shared_by_default/")
include("./unit_tests/shared/")
include("./unit_tests/scoped_enum/")
include("./unit_tests/tests_must_fail/lua_out/")
include("./unit_tests/tests_must_fail/cpp_in/")
include("./unit_tests/tests_must_fail/out/")
include("./unit_tests/tests_must_fail/in_out/")
include("./unit_tests/tests_must_fail/lua_return/")
include("./unit_tests/tests_must_fail/cpp_acquire/")
include("./unit_tests/tests_must_fail/lua_acquire/")
include("./unit_tests/tests_must_fail/maybe_null/")
include("./unit_tests/tests_must_fail/lua_maybe_null/")
include("./unit_tests/tests_must_fail/shared_return/")
local gen = require'build_scripts.oolua_generate'
local gen_details = gen.default_details()
newoption
{
trigger = 'cpp_params'
,value = 'Number'
,description = 'oolua-gen option\n\t' .. gen_details.cpp_params.desc
}
newoption
{
trigger = 'lua_params'
,value = 'Number'
,description = 'oolua-gen option\n\t' .. gen_details.lua_params.desc
}
newoption
{
trigger = 'constructor_params'
,value = 'Number'
,description = 'oolua-gen option\n\t' .. gen_details.constructor_params.desc
}
gen_defaults=nil
gen=nil
newaction
{
trigger = 'oolua-gen',
description = 'Generate OOLua boilerplate files',
execute = function ()
local gen = require'build_scripts.oolua_generate'
local gen_options =
{
cpp_params = _OPTIONS.cpp_params and tonumber(_OPTIONS.cpp_params) or nil
,lua_params = _OPTIONS.lua_params and tonumber(_OPTIONS.lua_params) or nil
,constructor_params = _OPTIONS.constructor_params and tonumber(_OPTIONS.constructor_params) or nil
}
gen.gen(gen_options,'include/')
end
}
newaction
{
trigger = 'oolua-amalgam',
description = 'Amalgamate OOLua',
execute = function ()
os.mkdir("./amal")
require('build_scripts.oolua_amalgamation').amalgamate('./include/', './src/', './amal/')
end
}