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.
33 lines
1.0 KiB
33 lines
1.0 KiB
5 years ago
|
package("eigen")
|
||
|
|
||
|
set_homepage("https://eigen.tuxfamily.org/")
|
||
|
set_description("C++ template library for linear algebra")
|
||
|
|
||
|
add_urls("https://gitlab.com/libeigen/eigen/-/archive/$(version)/eigen-$(version).tar.bz2",
|
||
|
"https://gitlab.com/libeigen/eigen")
|
||
|
add_versions("3.3.7", "685adf14bd8e9c015b78097c1dc22f2f01343756f196acdc76a678e1ae352e11")
|
||
|
|
||
|
add_deps("cmake")
|
||
|
add_includedirs("include/eigen3")
|
||
|
|
||
|
on_install("macosx", "linux", "windows", function (package)
|
||
|
import("package.tools.cmake").install(package)
|
||
|
end)
|
||
|
|
||
|
on_test(function (package)
|
||
|
assert(package:check_cxxsnippets({test = [[
|
||
|
#include <iostream>
|
||
|
#include <Eigen/Dense>
|
||
|
using Eigen::MatrixXd;
|
||
|
void test()
|
||
|
{
|
||
|
MatrixXd m(2,2);
|
||
|
m(0,0) = 3;
|
||
|
m(1,0) = 2.5;
|
||
|
m(0,1) = -1;
|
||
|
m(1,1) = m(1,0) + m(0,1);
|
||
|
std::cout << m << std::endl;
|
||
|
}
|
||
|
]]}, {configs = {languages = "c++11"}}))
|
||
|
end)
|