add lapack repo (#5313)
* add lapack repo * Limit the platform to Linux * fix grammar problem and add test * delete the cpp versionpull/5321/head
parent
06eef0d257
commit
1193b60dc6
1 changed files with 24 additions and 0 deletions
@ -0,0 +1,24 @@ |
|||||||
|
package("lapack") |
||||||
|
set_homepage("https://netlib.org/lapack/") |
||||||
|
set_description("LAPACK--Linear Algebra Package is a standard software library for numerical linear algebra") |
||||||
|
|
||||||
|
add_urls("https://github.com/Reference-LAPACK/lapack/archive/refs/tags/$(version).tar.gz", |
||||||
|
"https://github.com/Reference-LAPACK/lapack.git") |
||||||
|
|
||||||
|
add_versions("v3.12.0", "eac9570f8e0ad6f30ce4b963f4f033f0f643e7c3912fc9ee6cd99120675ad48b") |
||||||
|
|
||||||
|
add_deps("cmake", "gfortran") |
||||||
|
|
||||||
|
add_links( "lapacke", "lapack", "cblas", "blas") |
||||||
|
|
||||||
|
on_install("linux", function (package) |
||||||
|
local configs = {"-DLAPACKE=ON", "-DBUILD_TESTING=OFF", "-DCBLAS=ON"} |
||||||
|
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")) |
||||||
|
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) |
||||||
|
import("package.tools.cmake").install(package, configs) |
||||||
|
end) |
||||||
|
|
||||||
|
on_test(function (package) |
||||||
|
assert(package:has_cfuncs("cblas_snrm2", {includes = "cblas.h"})) |
||||||
|
assert(package:has_cfuncs("LAPACKE_dsyev", {includes = "lapacke_utils.h"})) |
||||||
|
end) |
Loading…
Reference in new issue