Skip to content

chore: support for eigen5#266

Open
beniz wants to merge 1 commit intomasterfrom
chore_eigen5_support
Open

chore: support for eigen5#266
beniz wants to merge 1 commit intomasterfrom
chore_eigen5_support

Conversation

@beniz
Copy link
Copy Markdown
Collaborator

@beniz beniz commented Apr 8, 2026

Support for eigen5, from #264

@beniz beniz force-pushed the chore_eigen5_support branch from 549f253 to 4e4319a Compare April 8, 2026 07:02
set (LIBCMAES_EIGEN_MIN_VERSION 3.4.0)
endif ()

find_package (Eigen3 REQUIRED)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have an issue with this line
for eigen5 it doesn't work
can you put this line with the else() statement?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works for me:

cmake -S /path/to/eigen-5.0.1 -B /path/to/eigen-5.0.1/build

and

cmake .. -DCMAKE_INSTALL_PREFIX=~/.local/ -DLIBCMAES_BUILD_TESTS=ON -DLIBCMAES_EIGEN_5=ON -DEigen3_DIR=/path/to/eigen-5.0.1/build

What exactly is your error ?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is because I build it directly with conan and add the requirements from our conan remote

def requirements(self):
        self.requires.add("eigen/5.0.0+0@jenkins/stable")

thus I have:

CMake Error at CMakeLists.txt:88 (find_package):

By not providing "FindEigen3.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Eigen3", but
CMake did not find one.

Could not find a package configuration file provided by "Eigen3" with any
of the following names:
Eigen3Config.cmake
eigen3-config.cmake

Add the installation prefix of "Eigen3" to CMAKE_PREFIX_PATH or set
"Eigen3_DIR" to a directory containing one of the above files. If "Eigen3"
provides a separate development package or SDK, be sure it has been
installed.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you need the cmake -S step above when not using conan, as it does create the missing Eigen3 config files.
I am not familiar with the conan path, can you provide the full set of steps to reproduce ?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for your answer, I added :
cmake.definitions["Eigen3_DIR"]
in my conanfile and it worked !!!!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we add it to the conan .py file ?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for my part, I would have say no, it's not mandatory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants