forked from mas-bandwidth/serialize
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpremake5.lua
85 lines (74 loc) · 1.85 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
83
84
85
solution "Serialize"
kind "ConsoleApp"
language "C++"
configurations { "Debug", "Release" }
includedirs { "." }
if not os.istarget "windows" then
targetdir "bin/"
end
rtti "Off"
warnings "Extra"
flags { "FatalWarnings" }
floatingpoint "Fast"
filter "configurations:Debug"
symbols "On"
defines { "SERIALIZE_DEBUG" }
filter "configurations:Release"
symbols "Off"
optimize "Speed"
defines { "SERIALIZE_RELEASE" }
project "test"
files { "test.cpp", "serialize.h" }
defines { "SERIALIZE_ENABLE_TESTS=1" }
project "example"
files { "example.cpp", "serialize.h" }
newaction
{
trigger = "clean",
description = "Clean all build files and output",
execute = function ()
files_to_delete =
{
"Makefile",
"*.make",
"*.txt",
"*.zip",
"*.tar.gz",
"*.db",
"*.opendb",
"*.vcproj",
"*.vcxproj",
"*.vcxproj.user",
"*.vcxproj.filters",
"*.sln",
"*.xcodeproj",
"*.xcworkspace"
}
directories_to_delete =
{
"obj",
"ipch",
"bin",
".vs",
"Debug",
"Release",
"release",
"cov-int",
"docs",
"xml"
}
for i,v in ipairs( directories_to_delete ) do
os.rmdir( v )
end
if not os.istarget "windows" then
os.execute "find . -name .DS_Store -delete"
for i,v in ipairs( files_to_delete ) do
os.execute( "rm -f " .. v )
end
else
for i,v in ipairs( files_to_delete ) do
os.execute( "del /F /Q " .. v )
end
end
end
}