From: Peter Dimov (pdimov_at_[hidden])
Date: 2021-05-28 14:30:20
Adam Wulkiewicz wrote:
> W dniu 28.05.2021 o 00:04, Peter Dimov via Boost pisze:
> > I'm adding CMakeLists.txt files (mostly generated by `boostdep --cmake
> > <libname>` to libraries that don't have one yet.
> Thanks for handling it for us. I have a few questions regarding this change. :)
> I'm curious mostly about target_link_libraries entry and dependencies.
> For reference:
> Are these libraries the direct dependencies of Geometry or are these all of the
> libraries from the dependency graph?
These are the direct dependencies `boostdep` sees in the header files of the
library. Basically what you see at
> Are we responsible for maintaining this list or is there some automatic process
> in place for that?
No, there's no automatic process. I generated the file with
`boostdep --cmake geometry`, but we won't be overwriting the CMakeLists.txt
> Some of these libraries are not used directly or are optional.
> Are we free to remove not used libraries from here?
> If we drop a dependency can we remove it?
> Should optional dependencies be listed?
> I'm asking because we provide optional files for adapting e.g. Polygon models
> to use them with Geometry. The same is or will be true for Variant, Variant2
> and Any. R-tree support for serialization is optional as well and enabled with
> #ifdef. The extensions are optional and exists only in develop branch. Etc.
You have latitude in choosing your dependencies, but with CMake, this is
more consequential. With b2, our current structure copies all the library
headers into boost/, so then any library can include any other without
linking to anything.
With CMake, if you don't link to Boost::foo, the foo headers aren't going
to be in the include path, so if a Geometry header includes a foo header
without Boost::foo being linked to, it will fail to compile.
Whether this is an acceptable outcome or not, is up to you, on a case by
> Are these dependencies only for includes or also for tests, examples and
> sources from documentation?
Only for the includes.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk