How to compile/link Boost with clang++/libc++?

I didn't know how to do this either. But after poking around in here, the getting started, and trial and error:

$ ./bootstrap --with-toolset=clang
$ ./b2 clean
$ ./b2 toolset=clang cxxflags="-stdlib=libc++" linkflags="-stdlib=libc++"

You'll get lots of warnings. And the signals library will fail to build due to LWG 2059. But otherwise I think it works.


Another option is to use Homebrew:

brew install boost --c++11

To get information on all options use:

brew info boost