package An official xmake package repository https://xrepo.xmake.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

31 lines
1.1 KiB

package("cumem")
set_kind("library", {headeronly = true})
set_description("CUDA Memory Management Wrapper with Type Safety")
set_homepage("https://github.com/BinhaoQin/cuMem")
add_urls("https://github.com/BinhaoQin/cuMem/archive/refs/tags/$(version).tar.gz",
"https://github.com/BinhaoQin/cuMem.git")
add_versions("1.0.0", "1c7956c840f7aa3940756c8d09a2ae44ce53681ae01f3378cf4501d81bf0638c")
add_deps("cuda", {system = true})
on_install("linux", "windows", function(package)
os.mkdir("cuMem")
os.cp("include/*.h", "cuMem")
os.cp("cuMem", package:installdir("include"))
end)
on_test(function(package)
assert(package:check_cxxsnippets({test = [[
#include <cuMem/cuConstant.h>
#include <cassert>
class Int {
public:
int value;
DEVICE_INDEPENDENT Int() : value(0) {}
};
void test() {
static_assert(sizeof(Segment<Int>) == sizeof(Int));
}
]]}, {configs = {languages = "c++17"}}))
end)