Boost logo

Boost :

Subject: Re: [boost] Proposal for moving Boost to CMake
From: P F (pfultz2_at_[hidden])
Date: 2017-06-17 04:34:36


> On Jun 16, 2017, at 11:24 PM, David Sankel via Boost <boost_at_[hidden]> wrote:
>
> On Fri, Jun 16, 2017 at 9:01 PM, Robert Ramey via Boost <
> boost_at_[hidden]> wrote:
>
>> On 6/16/17 4:44 PM, David Sankel via Boost wrote:
>>
>>> * Boost sources would provide a compatible, drop-in replacement for the
>>> 'FindBoost' module that is distributed with CMake. A CMake-based
>>> application
>>> could point to it and, instead of using the system Boost libraries,
>>> Boost
>>> targets would be built from source as part of the user build.
>>>
>>
>> Hmmm would this be a FindBoost for the whole of Boost or for each
>> particular library? Who would re-write and maintain this FindBoost as the
>> current one is not up the task. Getting this right - or even better is not
>> a trivial task.
>
>
> I agree that this is a non-trivial task. The contract for FindBoost is
> relatively straightforward. The implementation for the Boost-source version
> of this library would look at the COMPONENTS argument and, based on that,
> add_subdirectory the source for the particularly requested library. The
> CMakeLists.txt file would be author maintained and provide its
> corresponding target (e.g. boost::thread).

Thats not the the way `find_package` works at all. The `find_package` is used to find packages installed, it should never go out and build libraries.

If the user wants to add boost to their build(or set of libraries), you would use `add_subdirectory` directly and then override `find_package` to ignore boost packages, and then use the `boost::` alias targets provided.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk