-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpremake5.lua
More file actions
44 lines (39 loc) · 1.18 KB
/
Copy pathpremake5.lua
File metadata and controls
44 lines (39 loc) · 1.18 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
require "ecc/ecc"
--- CLANG: Tidy, Format
--- Run: premake5 format
--- Like running: clang-format -p . src/Renderer.cpp
--- But for every source and hpp file
newaction{
trigger = "format",
description = "Run clang format on all source files.",
execute = function ()
local files = table.join(os.matchfiles("src/**.cpp"), os.matchfiles("src/**.hpp"))
for _, f in ipairs(files) do
os.execute("clang-format -i" .. f)
end
end
}
--- Run: premake5 tidy
--- Like running: clang-tidy -p . src/Renderer.cpp
--- But for every source and hpp file
newaction{
trigger = "tidy",
description = "Run clang tidy on all source files.",
execute = function()
local files = table.join(os.matchfiles("src/**.cpp"), os.matchfiles("src/**.hpp"))
for _, f in ipairs(files) do
os.execute("clang-tidy -p" .. f)
end
end
}
-- Add other platforms here:
local has_prospero = os.isfile("platform/prospero/prospero.lua")
-- Workspace
workspace "Module"
configurations {debug, release, development}
platforms {"x64"}
startproject "engine"
location "build/vs"
if has_prospero then
platforms{"prospero"}
end