Skip to content

Commit 4d07bad

Browse files
build: add guard for clang-tidy-config.h in xmake rules (#306)
Co-authored-by: ykiko <ykikoykikoykiko@gmail.com>
1 parent 4a2a6aa commit 4d07bad

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

xmake.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,14 @@ rule("clice_clang_tidy_config")
192192
})
193193
end)
194194

195+
before_build(function (target)
196+
local dest = path.join(target:autogendir(), "rules/clice_clang_tidy_config/clang-tidy-config.h")
197+
if not os.exists(dest) then
198+
local src = path.join(os.projectdir(), "config/clang-tidy-config.h")
199+
os.vcp(src, dest)
200+
end
201+
end)
202+
195203
rule("clice_build_config")
196204
on_load(function(target)
197205
target:set("exceptions", "no-cxx")

0 commit comments

Comments
 (0)