intel / intel/hyperscan

Using boost from parent project's fetchcontent

Open
#384 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
5.5k
Forks
816
Avg merge
4d 21h
Merged PRs (30d)
2

Description

We utilize boost in one of our projects as well as hyperscan. For a couple different reasons we are trying to bring our boost dependency (and others) in via cmakes FetchContent instead of using an installed instance (we have at least one boost component that isn't header only). When using the distributed source or an installed instance with `find_package`, the target `Boost::boost` is available but this does not yet exist in the cmake variant [1]. The cmake variant is working for our main project. To leverage the same boost instance for hyperscan, I was able to get this working by building up a list of includes and storing it in `Boost_INCLUDE_DIRS` and disabling the `boost.cmake` include [2] within the hyperscan cmakelists.

I'm opening this more to start the discussion of how this can be supported. For now we are maintaining a local patch that is applied as part of our FetchContent for hyperscan. My first thought is to change the checks based on `BOOST_ENABLE_CMAKE` [3] however I am not sure if this variable is still expected to be set/used so having a hypserscan specific one may make more sense. I'm happy to provide the full cmake we are utilizing for boost to make this work if other are interested in trying it out.

[1] https://github.com/boostorg/cmake/issues/19
[2] https://github.com/intel/hyperscan/blob/master/CMakeLists.txt#L72
[3] https://github.com/boostorg/cmake/commit/5cbded7e4d34e6888a2559b632154a23b6de55be

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.