使用提取时找不到特征
我试图将特征库包括在我的项目中。
我正在使用cmake和fetchcontent来构建项目。我能够使用相同的方法包括另一个库。
”的snippit:cmake
if (NOT TARGET endftk )
FetchContent_Declare( endftk
GIT_REPOSITORY https://github.com/njoy/ENDFtk.git
GIT_TAG origin/develop )
FetchContent_MakeAvailable( endftk)
endif()
if (NOT TARGET Eigen)
FetchContent_Declare( Eigen
GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
GIT_TAG origin/master )
FetchContent_MakeAvailable( Eigen)
endif()
项
target_link_libraries(POLR
INTERFACE ENDFtk
INTERFACE eigen )
下面包括我的
#include <ENDFtk.hpp>
#include <Eigen>
'
#include <Eigen3>
#include <eigen>
#include <Eigen.hpp>
“依赖 尝试制作:
fatal error: Eigen: No such file or directory
但是,我没有这样的问题,包括和使用EndFTK库。
我在build/_deps
文件夹中查看,我确实在那里看到了eigen(and endftk)。
有人知道我需要做什么才能使特征包括吗?
我正在使用: CMAKE版本3.22.1 GCC版本11.3.0
请让我知道我是否有任何关键信息。
注意:POLR是我项目的名称。
I am attempting to include the Eigen libraries into my project.
I am using CMake and FetchContent to build the project. I was able to include another library using the same method.
A snippit of my "dependencies.cmake" is included below:
if (NOT TARGET endftk )
FetchContent_Declare( endftk
GIT_REPOSITORY https://github.com/njoy/ENDFtk.git
GIT_TAG origin/develop )
FetchContent_MakeAvailable( endftk)
endif()
if (NOT TARGET Eigen)
FetchContent_Declare( Eigen
GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
GIT_TAG origin/master )
FetchContent_MakeAvailable( Eigen)
endif()
I link both libraries using:
target_link_libraries(POLR
INTERFACE ENDFtk
INTERFACE eigen )
in my main header file I then include the libraries using:
#include <ENDFtk.hpp>
#include <Eigen>
I've also tried using the following:
#include <Eigen3>
#include <eigen>
#include <Eigen.hpp>
All of which fail with the following error message when attempting to make:
fatal error: Eigen: No such file or directory
However, I have no such issue including and using the ENDFtk library.
I've looked in my build/_deps
folder and I do see Eigen (and ENDFtk) there.
Does anybody know what I need to do in order to get Eigen to include?
I'm using:
cmake version 3.22.1
gcc version 11.3.0
Please let me know if there is any crucial information I'm leaving out.
Note: POLR is the name of my project.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论