Subject: Re: [boost] Request for a "Policy Review" regarding 'CMakeLists.txt'
From: Robert Ramey (ramey_at_[hidden])
Date: 2016-05-17 13:10:34
On 5/17/16 9:33 AM, Rene Rivera wrote:
> On Tue, May 17, 2016 at 11:29 AM, Paul Fultz II <pfultz2_at_[hidden]> wrote:
>> Cmake doesn't impose a layout, and that's the whole point. I clone hana and
>> then call `cmake hana` to build it using cmake. Imposing a layout such as
>> hiding it in some unknown directory just causes confusion.
> As a not-cmake-user I don't know what you mean there. What commands do you
> invoke, precisely?
As one who spend a fair amount of time with different ways to use CMake
I found that the best way to using in a setup like boost is
a) Put CMakeLists.txt files in subdirectories like src, test, example,
b) Put a minimal CMakeLists.txt file in parent directory which includes
common things liket setup etc. The top level includes sub directories.
So it can (and in my view) should be fairly small. Used in this way,
it's quite like boost build in it's way of doing things. It does take
special care to be permit the building of part of the project -
something boost build handles very well. I think many users of CMake
fall in the trap of making the top level as centralized system which in
short order becomes too complex to understand - like putting behavior in
base class which should have been placed in a derived class. But this
has to be handled on a case by case basis as CMake itself is very
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk