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.
 
 
 

30 lines
1.2 KiB

package("spectra")
set_kind("library", {headeronly = true})
set_homepage("https://spectralib.org/")
set_description("Sparse Eigenvalue Computation Toolkit as a Redesigned ARPACK")
set_license("MPL-2.0")
add_urls("https://github.com/yixuan/spectra/archive/refs/tags/$(version).tar.gz",
"https://github.com/yixuan/spectra.git")
add_versions("v1.0.1", "919e3fbc8c539a321fd5a0766966922b7637cc52eb50a969241a997c733789f3")
add_deps("cmake", "eigen")
on_install("windows", "macosx", "linux", "mingw", "cross", function (package)
import("package.tools.cmake").install(package)
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
#include <Eigen/Core>
#include <Spectra/SymEigsSolver.h>
void test() {
Eigen::MatrixXd A = Eigen::MatrixXd::Random(10, 10);
Eigen::MatrixXd M = A + A.transpose();
Spectra::DenseSymMatProd<double> op(M);
Spectra::SymEigsSolver<Spectra::DenseSymMatProd<double>> eigs(op, 3, 6);
eigs.init();
int nconv = eigs.compute(Spectra::SortRule::LargestAlge);
}
]]}, {configs = {languages = "c++14"}}))
end)