Boost logo

Boost :

Subject: Re: [boost] [cmake] Minimum viable cmakeification for Boost
From: Egor Pugin (egor.pugin_at_[hidden])
Date: 2017-06-21 15:18:00


Hi,

I've developed package manager based on cmake with declarative format
and custom cmake insertions (for imperative purposes). Declarative
format is generated into CMakeLists.txt.
And now I think that declarative approach does not scale well. With
increasing complexity of conditions of build system
instructions/settings/configurations, declarative format becomes
unmaintainable. Also it involves repetition of common constructions.
So you need to be careful with it.
Of course in simple cases when a library follows default rules,
declarative config for it can be just empty.

Some examples with comments:

1. https://cppan.org/projects/pvt.cppan.demo.boost
pvt.cppan.demo.boost project page. Most of the libraries has their
dependencies set correctly based on #includes. (Still boost deps are
the plate of spaghetti with header only deps.)

2. https://cppan.org/pvt.cppan.demo.boost.filesystem/version/1.64.0/specification
pvt.cppan.demo.boost.filesystem-1.64.0 specification.

3. https://pastebin.com/h4DB9tNj
Full declarative config of boost with all libraries. Again, boost deps
are not granular and look ugly.

4. https://pastebin.com/XPwW7ZHx
LLVM project specification. Exactly on this level I think declarative
approach got it drawbacks. There are a lot of similar targets that
differ only with their name, so they can be wrapped into functions or
macros as it's done in LLVM's cmake configs.

ps. I'm not proposing to use cppan in boost. It's only FYI, maybe you
find some useful ideas.
https://cppan.org/ - package manager page itself.

-- 
Egor Pugin

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