-
Notifications
You must be signed in to change notification settings - Fork 89
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
Fix the way in which Eigen is included #570
Fix the way in which Eigen is included #570
Conversation
Currently, Eigen is added via `target_include_directories` as a PUBLIC or INTERFACE tag. Unfortunately, this makes a built tesseract non-reusable on a system where Eigen is installed in a different folder. For example, Tesseract built on a system where Eigen was downloaded in the ROS workspace is not usable on a system where Eigen is installed in the default system directory.
I'm pretty sure @Levi-Armstrong did things like this because the target you're using now is not universally supported on all platforms which Tesseract wants to support. |
Thank you for the PR. I have been meaning to go through and do this for Eigen and Boost for a while since we dropped support for 16.04.
This is the goal to get everything to using target over cmake variables. I believe the Orocos marked as a having a bug may not be valid any more. I believe the issue was related to catkin not correctly handling interface targets which I believe have been fixed so its worth testing again. What was the issues with Boost on 18.04?
I agree, I will take a look. |
Codecov Report
@@ Coverage Diff @@
## master #570 +/- ##
=======================================
Coverage 91.29% 91.29%
=======================================
Files 160 160
Lines 9978 9978
=======================================
Hits 9109 9109
Misses 869 869 |
Main issue is that different Tesseract libraries look for different Boost components. In CMake 3.10, doing:
Correctly finds both
Only This means that:
This behavior fixed in 3.15, now |
@haudren Thank you for the information. I have updated both tesseract and tesseract_planning to leverage boost targets and update the cmake config to use find_package if the cmake version is less than 3.15 due to the issue that you outlined. Also the issues with kdl has be resolved so that has also been updated. Next I will work on TinyXml2 to leverage targets. Do you know if anything else that needs updating? |
Currently, Eigen is added via
target_include_directories
as a PUBLICor INTERFACE tag. Unfortunately, this makes a built tesseract
non-reusable on a system where Eigen is installed in a different folder.
For example, Tesseract built on a system where Eigen was downloaded in
the ROS workspace is not usable on a system where Eigen is installed in
the default system directory.
For a few more details:
In both cases, CMake errors out with:
As indeed, the user on machine B is not the same as on machine A, but Eigen is installed on both.
The root cause is that CMake generates the
tesseract_*-targets.cmake
, and they contain the dependency list. Without this fix, they look like:Note the two absolute paths to the Eigen libraries. With this fix:
Closing thoughts: