In the cluster of my uni I do not have sudo rights, and I need the version Eigen3 3.3.3
and they only offer Eigen 2.8
installed.
Now, I uploaded the source files of Eigen3 3.3.3
and tried to manually hook it up with cmake
.
Then I set the environmental variable CPLUS_INCLUDE_PATH
accordingly. In cmake
I have set the requirements as:
find_package(Eigen3 3.3.3 REQUIRED)
include_directories(${EIGEN3_INCLUDE_DIR})
But I get this error message:
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" (requested version 3.3.3) with any of the following names:
I don't understand why I have to manually provide a FindEigen3.cmake
file? Usually, one has not to do it. How to solve this error? I do not want to manipulate the existing CMakeList.txt
. Thanks.
Turning my comments into an answer
The library brings its own CMake configuration script . The CMake needs a hint where your Eigen3 library is to configure it correctly (see cmake/FindEigen3.cmake
).
So you can define the search path in your cmake command line call:
cmake -DCMAKE_MODULE_PATH:PATH=/path/to/Eigen3/cmake ..
References
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.