From 5a1f9dacc9bd989547c43af9cb1de33c7d0bc6fe Mon Sep 17 00:00:00 2001 From: star9029 Date: Tue, 2 Jul 2024 21:24:48 +0800 Subject: [PATCH] libpopcnt: add package (#4541) --- packages/l/libpopcnt/xmake.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 packages/l/libpopcnt/xmake.lua diff --git a/packages/l/libpopcnt/xmake.lua b/packages/l/libpopcnt/xmake.lua new file mode 100644 index 000000000..0ce359d5c --- /dev/null +++ b/packages/l/libpopcnt/xmake.lua @@ -0,0 +1,18 @@ +package("libpopcnt") + set_kind("library", {headeronly = true}) + set_homepage("https://github.com/kimwalisch/libpopcnt") + set_description("🚀 Fast C/C++ bit population count library") + set_license("BSD-2-Clause") + + add_urls("https://github.com/kimwalisch/libpopcnt/archive/refs/tags/$(version).tar.gz", + "https://github.com/kimwalisch/libpopcnt.git") + + add_versions("v3.1", "b4ea061f4c2e5385dff0dd032ad5a16c60dc0dd050391283afb463c0d62c19bd") + + on_install(function (package) + os.cp("libpopcnt.h", package:installdir("include")) + end) + + on_test(function (package) + assert(package:has_cfuncs("popcnt", {includes = "libpopcnt.h"})) + end)