Boost logo

Boost :

Subject: Re: [boost] [EXTERNAL] Request for a "Policy Review" regarding 'CMakeLists.txt'
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2016-05-23 19:22:39


On 24/05/2016 00:56, Paul Fultz II wrote:
>> On the other hand, if you found the "root" CMakeLists.txt in build/
>> or in cmake/ first, and then run the above commands from that
>> directory, then they would work as expected.
>
> Except there is no way to know it is the ‘root’, except that it is
> atthe ‘root’. Instead the user tells cget or cmake what the ‘root’
> is instead of trying to guess.

As you said, though, that complicates things if you're automatically
building dependencies rather than the main project they requested.
(Which I think I recall you saying was a feature of cget.)

It seems to me that a reasonable heuristic is to use a CMakeLists.txt at
the root if one is there; failing that, look in cmake/ and build/
subdirs (in that order).

Having said all that, I'm dubious about using cmake to automatically
build Boost library dependencies in the first place. The way I
typically use Boost (and I'm sure I'm not alone in this) is to either
use the pre-built packages (for Windows or Linux) or if I need something
newer, to use B2 to build the complete set of libraries myself and then
point other projects at those pre-built versions, rather than to build
individual sub-libraries for each project parent.


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