Boost logo

Boost Interest :

Subject: [Boost-cmake] CMake thoughts
From: Robert Bielik (robert.bielik_at_[hidden])
Date: 2009-06-02 03:40:14


The preliminary CMake file in the distr. (1.38.0) is IMHO way, WAY too complex. It makes no sense to have each sublib as a separate project, and in all different flavors at that (debug/rel/mt/st). It seems as it is designed just to create
the boost libraries, which in my view in a non-sensical approach of using CMake since boost is a library, not a standalone application.

The CMake file should be designed for inclusion in user CMake hierarchies, so I'd like a much more simple variant akin towards this:


option(BOOST_BUILD_STATIC_LIBRARY "Build Boost as STATIC library" ON)

  <list of all the sublibraries wanted/needed>

# Collect all the files needed into variable BOOST_SOURCE_FILES using the
# list from above
file(GLOB ...)

add_library(boost STATIC ${BOOST_SOURCE_FILES})
add_library(boost DYNAMIC ${BOOST_SOURCE_FILES})

This way I can easily incorporate boost into my own CMake hierarchy for creating my own projects and not clutter the
workspace with hundreds of projects all with different settings.

Just my 2 cents.

Ps. Apologies if I'm kicking in already opened doors.

Boost-cmake list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at