Pinocchio needs to setup some boost magic to ensure mpl::list and mpl::vector can hold more than their default 20 arguments. Including any boost header before that will prevent this configuration to happen, and compilation fails.
This PR moves all boost includes after pinocchio/tsid. It was already done in src/robot_dart/talos.cpp, I've just made a similar arrangement in all affected files.
Other options:
pinocchio defines and exports some limits in its CMakeLists.txt, but without another define (BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) this has no effect. Instead of changing the order of inclusion, we could add target_compile_definitions(inria_wbc PUBLIC BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS=1) on our side, but this means having half of the fix in pinocchio, half here :disappointed: and this would break if pinocchio removes or changes this in its cmakelists. This would however ensure that any new code in inria_wbc would also be protected against that bug.
adding the missing BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS in pinocchio directly seems to break things in python and was rejected.
as nobody likes this boost-config-by-global-defines thing, the requirement in pinocchio will hopefully disappear at some point anyway (using other c++ techniques instead of the good old mpl possibly...)
Pinocchio needs to setup some boost magic to ensure mpl::list and mpl::vector can hold more than their default 20 arguments. Including any boost header before that will prevent this configuration to happen, and compilation fails.
This PR moves all boost includes after pinocchio/tsid. It was already done in src/robot_dart/talos.cpp, I've just made a similar arrangement in all affected files.
Other options:
target_compile_definitions(inria_wbc PUBLIC BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS=1)
on our side, but this means having half of the fix in pinocchio, half here :disappointed: and this would break if pinocchio removes or changes this in its cmakelists. This would however ensure that any new code in inria_wbc would also be protected against that bug.BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
in pinocchio directly seems to break things in python and was rejected.