Skip to content
This repository has been archived by the owner on Sep 29, 2022. It is now read-only.

Commit

Permalink
add eigen3
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Tu committed Aug 2, 2014
1 parent cbe8de8 commit 7be9ee1
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
4 changes: 4 additions & 0 deletions eigen3/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=${PREFIX} -DCMAKE_BUILD_TYPE=Release ..
make install
21 changes: 21 additions & 0 deletions eigen3/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package:
name: eigen3
version: "3.2.1"

source:
fn: eigen3-3.2.1.tar.gz
url: http://bitbucket.org/eigen/eigen/get/3.2.1.tar.gz
sha1: 96709ff139c80861e7b2cf65a9dfca8a8cc46eeb

requirements:
build:
- cmake

test:
files:
- test.cc

about:
home: http://eigen.tuxfamily.org/
license: MPL2
summary: 'C++ template library for linear algebra'
3 changes: 3 additions & 0 deletions eigen3/run_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
g++ -I${PREFIX}/include -o test test.cc
./test
13 changes: 13 additions & 0 deletions eigen3/test.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#include <eigen3/Eigen/Dense>
#include <cassert>

using Eigen::MatrixXf;

int
main(void)
{
MatrixXf m(1, 1);
m(0, 0) = 1.0;
assert(m(0, 0) == 1.0);
return 0;
}

0 comments on commit 7be9ee1

Please sign in to comment.