boostorg / boostorg/boost_install

CMake package of libraries with dependencies to external libraries

Open
#18 9 comments 1 reaction 0 assignees View on GitHub
Dominant language
C
Stars
11
Forks
37
PR merge metrics
No merged PRs in 30d

Description

Some Boost libraries have dependencies to third party libraries: Boost.Iostreams (zlib, bzip2), Boost.Local (ICU), Boost.MPI (some MPI lib) come to mind.

In the current configuration package generated by the `boost-install` rule, the dependency to the third party library is not set explicitly. If we look at the Iostreams test:

```cmake
add_executable(test_gzip test_gzip.cpp)
target_link_libraries(test_gzip Boost::iostreams)
target_link_libraries(test_gzip ZLIB::ZLIB) # should not be necessary
```

This introduce subtle issues with the linking order since the dependency graph is

```
test_gzip <-- Boost::iostreams
<-- ZLIB::ZLIB
```

instead of

```
test_gzip <-- Boost::iostreams <-- ZLIB::ZLIB
```

A possible solution would be to add something like `find_dependency(ZLIB)` and `target_link_libraries(Boost::iostreams ZLIB::ZLIB)` in the CMake config file.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.