mirror of
https://github.com/ivabus/pantry
synced 2024-11-30 04:05:06 +03:00
+eigen.tuxfamily.org (#439)
* eigen.tuxfamily.org built * Should pass CI, cleaned up package.yaml * tweaks * wip --------- Co-authored-by: Max Howell <mxcl@me.com>
This commit is contained in:
parent
92a80c7ea0
commit
a703502b0d
1 changed files with 56 additions and 0 deletions
56
projects/eigen.tuxfamily.org/package.yml
Normal file
56
projects/eigen.tuxfamily.org/package.yml
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
distributable:
|
||||||
|
url: https://gitlab.com/libeigen/eigen/-/archive/{{version}}/eigen-{{version}}.tar.gz
|
||||||
|
strip-components: 1
|
||||||
|
|
||||||
|
versions:
|
||||||
|
- 3.4.0
|
||||||
|
|
||||||
|
build:
|
||||||
|
working-directory: build
|
||||||
|
dependencies:
|
||||||
|
tea.xyz/gx/cc: c99
|
||||||
|
tea.xyz/gx/make: '*'
|
||||||
|
cmake.org: '^3'
|
||||||
|
script: |
|
||||||
|
cmake .. -DCMAKE_INSTALL_PREFIX={{prefix}}
|
||||||
|
make install
|
||||||
|
|
||||||
|
# stuff expects `Eigen` to be in `include` rather than namespaced
|
||||||
|
cd "{{prefix}}"
|
||||||
|
mv include/eigen3/* include
|
||||||
|
cd include
|
||||||
|
rmdir eigen3
|
||||||
|
# but work for stuff that expects the namespace too
|
||||||
|
ln -s eigen3 .
|
||||||
|
test:
|
||||||
|
make test
|
||||||
|
|
||||||
|
test:
|
||||||
|
dependencies:
|
||||||
|
tea.xyz/gx/cc: c99
|
||||||
|
freedesktop.org/pkg-config: ^0.29
|
||||||
|
env:
|
||||||
|
cxxflags: $(pkg-config --cflags eigen3)
|
||||||
|
fixture: |
|
||||||
|
#include <iostream>
|
||||||
|
#include <Eigen/Dense>
|
||||||
|
using Eigen::MatrixXd;
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
script: |
|
||||||
|
mv $FIXTURE test.cpp
|
||||||
|
g++ test.cpp ${cxxflags} -o test
|
||||||
|
./test > output.txt
|
||||||
|
out=$(./test)
|
||||||
|
if test "$out" = $' 3 -1\n2.5 1.5'; then
|
||||||
|
echo "PASS"
|
||||||
|
else
|
||||||
|
echo "FAIL"
|
||||||
|
fi
|
Loading…
Reference in a new issue