add eigen test

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
This commit is contained in:
Brad Pitcher 2014-04-22 08:31:47 -07:00 committed by Timothy Gu
parent a1290233fa
commit 3632aea052
2 changed files with 25 additions and 0 deletions

21
src/eigen-test.cpp Normal file
View File

@ -0,0 +1,21 @@
/*
* This file is part of MXE.
* See index.html for further information.
*
* This code was originally found on:
* http://eigen.tuxfamily.org/dox/GettingStarted.html
*/
#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);
return 0;
}

View File

@ -24,6 +24,10 @@ define $(PKG)_BUILD
-DEIGEN_BUILD_PKGCONFIG=ON \
-Drun_res=1 -Drun_res__TRYRUN_OUTPUT=""
$(MAKE) -C '$(1)'/build -j '$(JOBS)' install VERBOSE=1
'$(TARGET)-g++' -W -Wall '$(2).cpp' -o \
'$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \
`'$(TARGET)-pkg-config' --cflags --lib eigen3`
endef
$(PKG)_BUILD_SHARED =