Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change boost.build jamfile for C++11 support?

I have been using boost.build or b2 for building a project. I am trying to add C++11 contructs like auto and begin but the standard invokation b2 release in the directory with the Jamfile does not recognize these.

like image 294
Humble Debugger Avatar asked Aug 26 '13 20:08

Humble Debugger


People also ask

What is boost jam?

Boost. Jam (BJam) is a build tool based on FTJam, which in turn is based on Perforce Jam. It contains significant improvements made to facilitate its use in the Boost Build System, but should be backward compatible with Perforce Jam.

How do I build a boost library?

Right-click example in the Solution Explorer pane and select Properties from the resulting pop-up menu. In Configuration Properties > Linker > Additional Library Directories, enter the path to the Boost binaries, e.g. C:\Program Files\boost\boost_1_62_0\lib\. From the Build menu, select Build Solution.


Video Answer


1 Answers

Added the following in Jamroot

 <toolset>gcc:<cxxflags>-std=gnu++0x
 <toolset>clang:<cxxflags>-std=c++11

Seems to be working

like image 186
Humble Debugger Avatar answered Sep 21 '22 07:09

Humble Debugger