views:

125

answers:

2

I don't know how to build Boost with C++0x compilers. Which option must be given to bjam? Should the user.config file be modified?Can someone help me?

Best, Vicente

+1  A: 

I came across an article for compiling Boost using clang: http://blog.llvm.org/2010/05/clang-builds-boost.html. It might be possible to adapt the changes proposed there for compiling Boost using Boost.Jam to your favorite C++0x compiler.

Pieter
+2  A: 

I have found the answer. I was waiting for a features something like 'std' and call it as follows:

bjam std=0x

but currently we need to use the low level variables cxxflags and add the specific compiler flags. For example for gcc we can do

bjam toolset=gcc cxxflags=-std=gnu++0x

Other compilers will need a different setting.

Waiting for a new Boost.Build feature, you can also define your own toolset as follows: Add the user.config or site.config file

using gcc
   : std0x
   : "/usr/bin/g++" # your path to the C++0x compiler
   : <cxxflags>-std=gnu++0x
   ;

And now call as

bjam toolset=gcc-std0x
Vicente Botet Escriba