Subject: Re: [boost] [cmake] Minimum viable cmakeification for Boost
From: Egor Pugin (egor.pugin_at_[hidden])
Date: 2017-06-21 15:18:00
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:
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.)
Full declarative config of boost with all libraries. Again, boost deps
are not granular and look ugly.
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