Subject: Re: [boost] [BCP] Script for global renaming Boost Namespace
From: Artyom (artyomtnk_at_[hidden])
Date: 2009-05-30 04:55:25
1. Added copyright - Boost License.
2. Some more regression tests passed, some code cleanup
1. How can I submit it as an addon to BCP utility?
2. Have anybody tested it, I'd like to see if there any problems,
especially on Windows platform -- I hadn't tested it there.
P.S.: The source is there http://art-blog.no-ip.info/files/rename.py
--- On Mon, 5/25/09, Artyom <artyomtnk_at_[hidden]> wrote:
> From: Artyom <artyomtnk_at_[hidden]>
> Subject: [BCP] Script for global renaming Boost Namespace
> To: boost_at_[hidden]
> Date: Monday, May 25, 2009, 11:14 AM
> Today Boost does not provide any backward binary
> compatibility. This
> makes big problems in shipping 3rd part libraries that
> depend on Boost
> because library user must use the same version of Boost as
> that 3rd
> part library was compiled with.
> The problem is become even more critical for ELF platforms
> where all symbols are exported by default.
> I had written a small Python script that switches boost
> to other, allowing 3rd part project include it without
> with primary Boost namespace.
> The script passes over the source tree of boost and changes
> include path from <boost/foo/bar.hpp> too
> and renames all macros and identifiers from
> some_BOOST_something to
> some_NEWNAMESPACE_something and some_boost_something to
> It does not touch comments (copyright) and strings unless
> the string
> is in form "boost/.*" which is usually some reference for
> I've run this script on the 1.39 version of boost and
> successfully build full boost release and run some of
> regression tests
> like Boost.Asio, Boost.Regex, Boost.Function and others,
> The source code is available at:
> You run it as:
> ./rename /path/to/boost/source
> It renames all macros and namespaces to new namespace, and
> main include directory to new_namespace_na,e.
> Few points:
> 1. It is only alpha version script, I just want to see
> feedback and
> 2. I do not update build scripts. I assume that each
> library that
> tryes to import its own version of Boost
> would provide its own
> build system.
> 3. The build scripts should be updated differently because
> they have
> different syntax and grammar. The
> required changes are to
> fix different build defines
> Please, give feedback proposal. If there someone who is
> with Boost.Build systems can actually help, this would be
> very good.
> Today there is a big problem with working with different
> versions of
> Boost. It should be solved.
> I think this script may be a valuable addition to
> Boost.BCP utility
> that allows extracting a subset of boost for integration in
> 3rd part
> tools and libraries.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk