Boost logo

Boost Interest :

Subject: Re: [Boost-cmake] Cmake Variable Naming
From: James C. Sutherland (James.Sutherland_at_[hidden])
Date: 2009-12-07 13:39:21


On Dec 7, 2009, at 10:34 AM, Michael Jackson wrote:

> Just a comment on some of the variable naming within the Cmake files. There
> are already some folks embedding the entire boost-cmake distribution into
> their own projects, then using "add_subdirectory()" to try and build just
> the parts that they need. Since Cmake does not really have a namespace I
> think that a few of the variables may need to be prefixed with "BOOST_":
>
>
> ENABLE_DEBUG ON
> ENABLE_MULTI_THREADED ON
> ENABLE_RELEASE ON
> ENABLE_SHARED OFF
> ENABLE_SINGLE_THREADED OFF
> ENABLE_STATIC ON
>
> Probably should be BOOST_ ENABLE_DEBUG.... Or Boost-Cmake may start to have
> some unintended name clashing. Plus this helps keep all the boost variables
> together in the Cmake-GUI and CCMake applications.
>
> Thoughts?
>
> Mike Jackson

A question: why embed boost into a project rather than configuring and building it separately (possibly automatically from within another project)? Then there wouldn't really be any name clashes on the global variables, right?

You could automatically download, configure, and build boost as a TPL from within your build system without absorbing boost into your project.

Can you help me see why it would be better to absorb boost (and its build system) into your own project?


Boost-cmake list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk