Boost logo

Boost :

Subject: Re: [boost] Cmake
From: P F (pfultz2_at_[hidden])
Date: 2017-06-25 18:48:52

> On Jun 25, 2017, at 12:22 PM, Niall Douglas via Boost <boost_at_[hidden]> wrote:
> On 25/06/2017 13:24, Peter Dimov via Boost wrote:
>> David Sankel wrote:
>>>> I've done a proof of concept for (2), which can be seen here:
>>> Thanks for contributing this Peter. Could you summarize the
>>> differences between your proof of concept and Niall's? I think one
>>> point of difference is the support for a CMake-based installation of
>>> libraries. Is there anything else?
>> Mine is more or less vanilla CMake, without separate targets for
>> static/shared, and with installation support. I also don't list the
>> header files, just the sources.
> I don't see anything in Peter's example which couldn't be implemented in
> cmake 2.8?

There’s `add_library(INTERFACE)` and `find_depdendency` which is not in cmake 2.8.

> It's best practice cmake 2.8-3.0 no doubt, but cmake >= 3.5,
> I don't think so.

Says who? We are following the guidelines presented by Daniel Pfeifer on how to setup cmake in 2017 using the latest version of cmake.

More importantly, this handles the different scenarios users want to use cmake for(ie supporting both `find_package` and `add_subdirectory`). What you presented does not, nor is there a demo or document on how this can be made to support the different scenarios.

Boost list run by bdawes at, gregod at, cpdaniel at, john at