Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Target "badslam_test" links to target "Eigen3::Eigen" but the target was not found. #79

Closed
lql0602 opened this issue Nov 17, 2021 · 4 comments

Comments

@lql0602
Copy link

lql0602 commented Nov 17, 2021

Thanks for your work. However, I cannot build it now. I just input: cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CUDA_FLAGS="-arch=sm_61" ..

CMake Error at applications/badslam/CMakeLists.txt:200 (add_executable):
Target "badslam_test" links to target "Eigen3::Eigen" but the target was
not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?

CMake Error at applications/badslam/CMakeLists.txt:200 (add_executable):
Target "badslam_test" links to target "Eigen3::Eigen" but the target was
not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?

CMake Error at applications/badslam/CMakeLists.txt:200 (add_executable):
Target "badslam_test" links to target "Eigen3::Eigen" but the target was
not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?

CMake Error at applications/badslam/CMakeLists.txt:200 (add_executable):
Target "badslam_test" links to target "Eigen3::Eigen" but the target was
not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?

CMake Error at applications/badslam/CMakeLists.txt:180 (add_executable):
Target "badslam" links to target "Eigen3::Eigen" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?

CMake Error at applications/badslam/CMakeLists.txt:180 (add_executable):
Target "badslam" links to target "Eigen3::Eigen" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?

CMake Error at applications/badslam/CMakeLists.txt:180 (add_executable):
Target "badslam" links to target "Eigen3::Eigen" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?

CMake Error at applications/badslam/CMakeLists.txt:180 (add_executable):
Target "badslam" links to target "Eigen3::Eigen" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?

CMake Error at applications/badslam/CMakeLists.txt:56 (add_library):
Target "badslam_baselib" links to target "Eigen3::Eigen" but the target was
not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?

CMake Error at applications/badslam/CMakeLists.txt:56 (add_library):
Target "badslam_baselib" links to target "Eigen3::Eigen" but the target was
not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?

CMake Error at applications/badslam/CMakeLists.txt:56 (add_library):
Target "badslam_baselib" links to target "Eigen3::Eigen" but the target was
not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?

CMake Error at applications/badslam/CMakeLists.txt:56 (add_library):
Target "badslam_baselib" links to target "Eigen3::Eigen" but the target was
not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?

but i have instaledl eigen3
-modversion eigen3
3.3.7

@puzzlepaint
Copy link
Collaborator

This seems like there must be some error in locating the Eigen3 installation. Badslam's CMakeLists.txt does have a find_package call for it here:

find_package(Eigen3 REQUIRED)

Perhaps Eigen3 is installed in a non-standard location on your system? In that case, you could try specifying its path to CMake manually (for example, by checking with ccmake and filling in the Eigen3-related variables that are set to NOT_FOUND)

@neilzhuu
Copy link

Hello @lql0602, I got the same problem. Did you solve it?

@neilzhuu
Copy link

I replace find_package(Eigen3 REQUIRED) with find_package(Eigen3 REQUIRED NO_MODULE) and finally it compiles well.

@puzzlepaint
Copy link
Collaborator

@neilzhuu Thanks for the update. Eigen also seems to recommend using NO_MODULE (see Using Eigen in CMake Projects), so I committed the change to the repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants