Boost logo

Boost :

Subject: Re: [boost] Cmake
From: paul (pfultz2_at_[hidden])
Date: 2017-06-26 18:05:57


On Sun, 2017-06-25 at 21:15 +0100, Niall Douglas via Boost wrote:
> >
> > >
> > > 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.
> Ok, more poor wording by me. Peter's cmake makes no use of cmake 3 only
> design patterns that I could see.

What cmake 3 only design patterns? Peter's implementation is using Daniel
Pfeifer's and Stephen Kelley's design patterns for cmake 3.

> The old trick of implementing
> interface libraries in cmake 2.8 (and often necessary before cmake 3.5)

Cmake 3.5? You claim in the source, its so that `add_dependencies` works on
header-only(which is a cmake 3.3 feature), but you don't ever use that feature
anyways.

> was via empty static libraries, so you generate from cmake an empty
> source file and compile it into an empty static library, then propagate
> header dependencies etc. It's an easy function to write, and gets you
> 80% of proper cmake 3 interface libraries.

If you are going to emulate things, you could say your implementation is cmake
2.8 as well.

>
> find_dependency() isn't needed nor ought to be in any Boost cmake
> implementation for all the many good reasons I've already repeatedly
> listed ad nauseum by now.

It is needed to find transitive dependencies in a package configuration file.

> It's way overkill for Boost's needs and
> introduces significant added complexity and maintenance. If it's in any
> final design, I would consider such a design to be of poor quality not
> properly thought through.

I disagree, I think Daniel Pfeifer's and Stephen Kelley's design is very well
though out.


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