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 #include 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)