-
Notifications
You must be signed in to change notification settings - Fork 3
/
premake5.lua
82 lines (68 loc) · 1.97 KB
/
premake5.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
local packages = json.decode(io.readfile(".cache/packages.json"))
local projects = "" .. _MAIN_SCRIPT_DIR .. "/.build/" .. _ACTION .. "/projects"
if os.istarget("linux") then
toolset ("clang")
end
workspace "ce"
configurations { "Debug", "Release" }
platforms { "x64" }
startproject "ce-test"
warnings "extra"
symbols "On"
language "C++"
cppdialect "C++17"
rtti "Off"
exceptionhandling "Off"
staticruntime "off"
debugdir (_MAIN_SCRIPT_DIR)
location ("" .. _MAIN_SCRIPT_DIR .. "/.build/" .. _ACTION)
--defines { "CE_USER_INCLUDE=\"ce_config.h\"" }
filter { "configurations:Debug" }
defines { "DEBUG" }
flags { "FatalWarnings" }
filter { "configurations:Release" }
defines { "NDEBUG" }
optimize "speed"
filter {}
project ".build"
kind "Makefile"
location (projects)
files { "*" }
buildcommands { _PREMAKE_COMMAND .. " " .. _ACTION .. " --file=" .. _MAIN_SCRIPT }
rebuildcommands { "cd " .. _MAIN_SCRIPT_DIR, "call premake5.bat" }
cleancommands { "cd " .. _MAIN_SCRIPT_DIR }
project "ce"
kind "StaticLib"
location (projects)
includedirs { "lib/h" }
vpaths { ["/ce"] = "lib/h/**", ["*"] = "lib/*" }
files { "lib/**" }
project "ce-test"
kind "ConsoleApp"
location (projects)
links { "ce", "googletest" }
includedirs { "lib/h", packages.googletest.h }
files { "test/**" }
project "googletest"
kind "StaticLib"
location (projects)
local self = packages.googletest
includedirs
{
self.h,
self.src,
self.src .. "../",
}
files
{
self.h .. "**.h",
self.src .. "**.h",
self.src .. "gtest.cc",
self.src .. "gtest-death-test.cc",
self.src .. "gtest-filepath.cc",
self.src .. "gtest-matchers.cc",
self.src .. "gtest-port.cc",
self.src .. "gtest-printers.cc",
self.src .. "gtest-test-part.cc",
self.src .. "gtest-typed-test.cc",
}