Skip to content

Commit

Permalink
Update xmake.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
heheda123123 authored Jul 5, 2024
1 parent 2d6a369 commit 3ca1234
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/b/bdwgc/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,19 @@ package("bdwgc")

add_deps("cmake")

on_install("macosx", "linux", "android", "iphoneos", function (package)
if is_plat("windows") then
add_deps("libatomic_ops")
end

on_install("macosx", "linux", "android", "iphoneos", "windows", "mingw", function (package)
local configs = {}
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
import("package.tools.cmake").install(package, configs)
end)

on_test(function (package)
assert(package:has_cfuncs({test=[[
assert(package:check_csnippets({test=[[
void test() {
GC_INIT();
int *ptr = GC_MALLOC(sizeof(int));
Expand Down

0 comments on commit 3ca1234

Please sign in to comment.