Subject: Re: [boost] Cmake
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2017-06-25 20:15:27
>> 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. The old trick of implementing
interface libraries in cmake 2.8 (and often necessary before cmake 3.5)
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.
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'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.
-- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk