-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpremake5.lua
More file actions
69 lines (54 loc) · 1.47 KB
/
premake5.lua
File metadata and controls
69 lines (54 loc) · 1.47 KB
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
workspace 'lowflow'
configurations { 'dbg', 'rel' }
project 'lowflow'
kind 'ConsoleApp'
language 'C'
targetdir 'bin/lowflow/%{cfg.buildcfg}'
files { 'src/**.h', 'src/**.c' }
buildoptions { "-Wall", "-Werror", "-Wpedantic" }
filter 'configurations:dbg'
defines { 'LF_DEBUG_CONFIG' }
symbols 'On'
filter 'configurations:rel'
optimize 'On'
project 'lowflow-lib'
kind 'StaticLib'
language 'C'
targetdir 'lib/lowflow/%{cfg.buildcfg}'
files { 'src/**.h', 'src/**.c' }
buildoptions { "-Wall", "-Werror", "-Wpedantic" }
filter 'configurations:dbg'
symbols 'On'
filter 'configurations:rel'
defines { 'NDEBUG' }
optimize 'On'
project 'munit-lib'
kind 'StaticLib'
language 'C'
cdialect 'C11'
targetdir 'lib/lowflow/%{cfg.buildcfg}'
files { 'vendor/munit/munit.h', 'vendor/munit/munit.c' }
filter 'configurations:dbg'
symbols 'On'
filter 'configurations:rel'
defines { 'NDEBUG' }
optimize 'On'
project 'tests'
kind 'ConsoleApp'
language 'C'
targetdir 'bin/tests/%{cfg.buildcfg}'
files { 'tests/**.c' }
links { 'munit-lib', 'lowflow-lib' }
filter 'configurations:dbg'
symbols 'On'
filter 'configurations:rel'
defines { 'NDEBUG' }
optimize 'On'
newaction {
trigger = "format",
description = "Run clang-format on all source files",
execute = function ()
os.execute('find -type f -name *.h | xargs clang-format -i')
os.execute('find -type f -name *.c | xargs clang-format -i')
end
}