-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxmake.lua
More file actions
28 lines (25 loc) · 768 Bytes
/
Copy pathxmake.lua
File metadata and controls
28 lines (25 loc) · 768 Bytes
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
-- luacheck: ignore 111 113 143
---@diagnostic disable: undefined-global, undefined-field
includes("packages/c/cppinsights")
add_rules("mode.debug", "mode.release")
set_languages("c++20")
add_requires("cppinsights", { configs = { dylib = true } })
add_requires("llvm")
target("cppinsights")
do
add_rules("lua.module")
add_files("*.cpp", "*.c")
add_packages("cppinsights", "llvm")
add_links("clang-cpp")
local profiles = os.getenv "NIX_PROFILES" or ""
for profile in profiles:gmatch("%S+") do
local dir = path.join(profile, "include")
if os.isdir(dir) then
add_includedirs(dir)
end
dir = path.join(profile, "lib")
if os.isdir(dir) then
add_linkdirs(dir)
end
end
end