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

Adding Boost via cpm #1763

Open
wants to merge 8 commits into
base: main2.0
Choose a base branch
from
Open

Adding Boost via cpm #1763

wants to merge 8 commits into from

Conversation

dcoeurjo
Copy link
Member

PR Description

Adding boost via CPM (not working yet because of BoostAddons --ping @BDoignies--).

Checklist

  • Unit-test of your feature with Catch.
  • Doxygen documentation of the code completed (classes, methods, types, members...)
  • Documentation module page added or updated.
  • New entry in the ChangeLog.md added.
  • No warning raised in Debug mode.
  • All continuous integration tests pass (Github Actions)

@dcoeurjo
Copy link
Member Author

Issue at cmake when adding boost::headers to the BoostAddons target... I'm not sure to understand the EXPORT issue. Any idea, @BDoignies ?

@BDoignies
Copy link
Contributor

BDoignies commented Feb 21, 2025

Yes, you need to add the library "boost_headers" (not BOOST::Headers because this is an aliased name) to the things that are exported with the libraries.

I think this is because there is no export rules in the boost.cmake file (unlike eigen.cmake:81)

I am not sure where the boost.cmake comes from and left it untouch. But this is probably more appropriate to modify this file instead. Especially since the "boost_headers" target is somewhat obscure and not used directly in the linking process...

@BDoignies
Copy link
Contributor

Note: before sending the commit, I have not tried to compile the code, just to run the cmake. Looking at the error message, some boost/libraries are missing when creating the targets.

@dcoeurjo
Copy link
Member Author

Ok thx, the boost.cmake comes from adobe/lagange.

@BDoignies
Copy link
Contributor

My commit should clean up cmake and work (hopefully).

When tried locally, DGtalTools was still linking to system boost. Fixing this requires a PR in DGtalTools to link against the correct boost library. As long as there are no boost cpp files in use, this should not be a problem.

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