[CMake] About structuring cmake for big project?

Nicholas Devenish ndevenish at gmail.com
Wed Oct 25 07:53:24 EDT 2017


On Wed, Oct 25, 2017 at 10:36 AM, Carlton Banks <noflaco at gmail.com> wrote:

> Is there some literature that desbribes how cmakelist has to be defined a
> big system, that involve multiple smaller modules within the big module.


Unfortunately, written documentation of structuring larger projects with
CMake seems to be as rare and hard to find as documentation on CMake "Best
practices". I suspect that the individual uniqueness of each large project
combined with "once it is working don't touch it" means that developers
settle on something that "works" rather than something they are happy with,
and so don't show it off.

If you have anything beyond a fixed repository of code with simple
dependencies then you seem to be pretty much on your own.

As a start, I'd suggest looking for other large projects that transitioned
to using CMake - I've found LLVM useful in particular as a large but
tightly-bound set of modular, but optional components. KDE is using CMake,
but I've yet to find a good place to start digging - the ecosystem is so
intimidatingly large that I'm not sure their solutions are applicable to
anyone else except them. Hopefully Boost will move to CMake (as is
currently proposed) and give another well known library example.

Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20171025/748eca52/attachment.html>


More information about the CMake mailing list