dimanche 27 décembre 2015

How to compile Boost with an older std of C++? (C++03 in particular)

I am working in a project dependent of Boost (http://ift.tt/1Vl6PaV), this project currently only supports C++03. With the last update of gcc++ (v.5) the C++11 has become the default std, technically I solved the problem modifying the CXX_FLAGS adding:

-std=c++03

The problem comes with the Boost library, which I am not able to compile with the C++03 std (I think, I don't know how to check with which std I have compiled). I tried employing the following command to compile Boost:

./b2 install stage --with-python --with-serialization cxxflags="-std=c++03"

I have tried too modify the Jamroot file, adding the following lines:

  <toolset>gcc:<cxxflags>-std=gnu++03
  <toolset>clang:<cxxflags>-std=c++03

But the problem persist, when I compile the whole project I obtain the following kind of warning (several times):

/usr/local/include/boost/type_traits/detail/template_arity_spec.hpp:13:84: note: #pragma message: NOTE: Use of this header (template_arity_spec.hpp) is deprecated # pragma message("NOTE: Use of this header (template_arity_spec.hpp) is deprecated")

That's why I suspect that my changes do not take effect.

Thank you very much for your help

Aucun commentaire:

Enregistrer un commentaire