parent
f626c1de25
commit
3e0b10e5e5
2 changed files with 52 additions and 0 deletions
@ -0,0 +1,33 @@ |
||||
package("blitz") |
||||
|
||||
set_homepage("https://github.com/blitzpp/blitz") |
||||
set_description("Blitz++ Multi-Dimensional Array Library for C++") |
||||
set_license("LGPL-3.0") |
||||
|
||||
add_urls("https://github.com/blitzpp/blitz/archive/refs/tags/$(version).zip", |
||||
"https://github.com/blitzpp/blitz.git") |
||||
add_versions("1.0.2", "a477b9692a47363fce5929bba6d6d230773ddfbb020ce6841f7a961a55b9e71f") |
||||
|
||||
if is_plat("windows") then |
||||
add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true}) |
||||
end |
||||
|
||||
add_deps("cmake") |
||||
add_deps("python 3.x", {kind = "binary"}) |
||||
|
||||
on_install("windows", "macosx", "linux", function (package) |
||||
io.replace("src/CMakeLists.txt", "SHARED", package:config("shared") and "SHARED" or "STATIC", {plain = true}) |
||||
io.replace("src/CMakeLists.txt", "NOT WIN32", "FALSE", {plain = true}) |
||||
import("package.tools.cmake").install(package) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
void test() { |
||||
blitz::Array<double, 1> x(100); |
||||
x = blitz::tensor::i; |
||||
blitz::Array<double, 1> y(x + 150); |
||||
blitz::Array<double, 1> z(x + y * 2); |
||||
} |
||||
]]}, {configs = {languages = "c++11"}, includes = "blitz/array.h"})) |
||||
end) |
@ -0,0 +1,19 @@ |
||||
package("papi") |
||||
|
||||
set_homepage("https://icl.utk.edu/papi/index.html") |
||||
set_description("Performance Application Programming Interface") |
||||
set_license("BSD-3-Clause") |
||||
|
||||
add_urls("http://icl.utk.edu/projects/papi/downloads/papi-$(version).tar.gz") |
||||
add_versions("6.0.0", "3442709dae3405c2845b304c06a8b15395ecf4f3899a89ceb4d715103cb4055f") |
||||
|
||||
add_configs("shared", {description = "Build shared library.", default = true, type = "boolean", readonly = true}) |
||||
|
||||
on_install("linux", function (package) |
||||
os.cd("src") |
||||
import("package.tools.autoconf").install(package) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cfuncs("PAPI_library_init", {includes = "papi.h"})) |
||||
end) |
Loading…
Reference in new issue