MichalSzczep
MichalSzczep

Reputation: 365

How to change version of Eigen

In my ROS package I would like to use a last stable version of Eigen which is 3.3.4.

However when I check my version into package by EIGEN_MAJOR_VERSION, EIGEN_WORLD_VERSION, EIGEN_MINOR_VERSION I have got a 3.3.90.

In my CMakeList:

find_package(Eigen3 REQUIRED)
include_directories(include ${EIGEN3_INCLUDE_DIR}

find_package for specific version does not exists.

So how can I change the version? I downloaded Eigen from official github. I built it bysudo make install I got a log that everything is updated.

Up-to-date: /usr/local/include/eigen3/...

Thanks.

Upvotes: 3

Views: 9782

Answers (1)

MichalSzczep
MichalSzczep

Reputation: 365

The answer was very very simply, when I clone from githube it was the newest version...

You can find the last stable version on official Eigen web. Then download, and follow the INSTALL instructions. So create build folder, cmake src_directory, sudo make install which will copy all headers into /usr/include/eigen3/.. then you can use version which you compile.

I suppose that as Eigen has only .h files you don't really need compile lib only do find_package(Eigen3 REQUIRED PATH ...) but I didn't test this solution.

Upvotes: 3

Related Questions