summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad Pitcher <bradpitcher@gmail.com>2014-04-22 15:31:47 (GMT)
committerTimothy Gu <timothygu99@gmail.com>2014-04-27 03:01:16 (GMT)
commit3632aea052b13788a35b02b334a0c6cf6d8b55ca (patch)
treeba1d3034e4e85bff09e3c919f32a17a5be67b542
parenta1290233fa097e9b922fc947eba32d78db339aff (diff)
downloadmxe-3632aea052b13788a35b02b334a0c6cf6d8b55ca.zip
mxe-3632aea052b13788a35b02b334a0c6cf6d8b55ca.tar.gz
mxe-3632aea052b13788a35b02b334a0c6cf6d8b55ca.tar.bz2
add eigen test
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
-rw-r--r--src/eigen-test.cpp21
-rw-r--r--src/eigen.mk4
2 files changed, 25 insertions, 0 deletions
diff --git a/src/eigen-test.cpp b/src/eigen-test.cpp
new file mode 100644
index 0000000..91869d5
--- /dev/null
+++ b/src/eigen-test.cpp
@@ -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;
+}
diff --git a/src/eigen.mk b/src/eigen.mk
index 7af4f4e..d7cafc7 100644
--- a/src/eigen.mk
+++ b/src/eigen.mk
@@ -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 =