sfof
|
Author: Samuel Farrens
Year: 2016
At the time of writing this the current default c/c++ compiler on OSX is clang. To install this code it is highly recommended to instead use GNU GCC. This can be installed directly from the source, or using packages like MacPorts or Homebrew.
If GCC is used then the Boost libraries also need to be built with GCC. This can be done (tested for boost v1.58.0) as follows:
>> tar -xzvf SOURCE
e.g. >> tar -xzvf boost_1_58_0.tar.gz
>> ./bootstrap.sh –prefix=<PATH> –with-toolset=gcc
e.g. >> ./bootstrap.sh --prefix=/home/boost --with-toolset=gcc
using gcc : <VERSION> : <PATH>g++-<VERSION> : <linker-type>darwin ;
e.g. using gcc : 4.9.0 : /usr/bin/g++-4.9.0 : <linker-type>darwin ;
>> ./b2 install
NOTE: From OSX 10.10 and onwards it may be necessary to add the following option:
>> ./b2 cxxflags="-stdlib=libstdc++" install
After building the Boost libraries simply run cmake specifying the use of GCC and the path to Boost as follows:
>> cmake -DBOOST_ROOT=<PATH>
e.g. >> CC=/usr/bin/gcc-4.9.0 CXX=/usr/bin/g++-4.9.0 cmake -DBOOST_ROOT=/home/boost