Boost logo

Boost :

Subject: [boost] CMake Modularization
From: Philip Woods (elzairthesorcerermailinglist_at_[hidden])
Date: 2016-09-27 11:04:36


CMake is a widely used build system and has become for many the de facto
standard. Boost is a
widely used collection of modules and has become for many part of the de
facto standard.
However, the two do not play very well together. I know there is another
port of boost to CMake, but
it has lain dormant for years and uses an old version of boost; plus I
chose to take a different route.
The old project attempted to completely replace Boost.Build with CMake. My
example port simply
allows people to more easily use boost modules in their projects.

I created an example project
https://github.com/Elzair/cmake-boost-filesystem-test to demonstrate
my ideas. I added CMake build support to the minimum number of modules
needed to support this
demo: https://github.com/Elzair/assert https://github.com/Elzair/config
https://github.com/Elzair/core
https://github.com/Elzair/filesystem/tree/master and
https://github.com/Elzair/system

I even added CMake build support to the header only boost libraries. I did
this for two reasons.
First, I did not want users to have to fool with CMake's find_package().
Second, I wanted to add
helpful error messages in case a user has not included all of a module's
dependencies (or added
them in the wrong order).

Would the community be interested in modular CMake support for more
modules? Any comments, questions, critiques or suggestions are welcome.


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