Verified Commit c1ff8821 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

core: enforce definition of BOOST_MPL_LIMIT_LIST_SIZE

parent 8b56bd12
......@@ -181,14 +181,6 @@ IF(BUILD_WITH_HPP_FCL_SUPPORT)
ENDIF(BUILD_PYTHON_INTERFACE)
ENDIF(BUILD_WITH_HPP_FCL_SUPPORT)
# Enforce the preprocessed version of boost::list and boost::vector
# This information is redundant with the content of include/pinocchio/container/boost-container-limits.hpp
# but it avoids any compilation issue.
ADD_DEFINITIONS(-DBOOST_MPL_LIMIT_LIST_SIZE=30)
ADD_DEFINITIONS(-DBOOST_MPL_LIMIT_VECTOR_SIZE=30)
LIST(APPEND CFLAGS_DEPENDENCIES "-DBOOST_MPL_LIMIT_LIST_SIZE=30")
# Path to boost headers
INCLUDE_DIRECTORIES(SYSTEM ${Boost_INCLUDE_DIRS})
......
//
// Copyright (c) 2019 INRIA
// Copyright (c) 2019-2021 INRIA
//
#ifndef __pinocchio_container_boost_container_limits_hpp__
......@@ -20,13 +20,18 @@
#if !defined(BOOST_MPL_LIMIT_LIST_SIZE)
// Check the inclusion order
#if defined(BOOST_MPL_LIST_HPP_INCLUDED)
# error "You should include pinocchio before boost (e.g. #include <pinocchio/fwd.hpp>)"
# error "You should include pinocchio before the Boost headers (e.g. #include <pinocchio/fwd.hpp>)"
#endif
#define BOOST_MPL_LIMIT_LIST_SIZE PINOCCHIO_BOOST_MPL_LIMIT_CONTAINER_SIZE
#elif BOOST_MPL_LIMIT_LIST_SIZE < PINOCCHIO_BOOST_MPL_LIMIT_CONTAINER_SIZE
# error "BOOST_MPL_LIMIT_LIST_SIZE value is lower than the value of PINOCCHIO_BOOST_MPL_LIMIT_CONTAINER_SIZE"
#if defined(BOOST_MPL_LIST_HPP_INCLUDED)
# error "You should include pinocchio before the Boost headers (e.g. #include <pinocchio/fwd.hpp>)"
#else
# error "BOOST_MPL_LIMIT_LIST_SIZE value is lower than the value of PINOCCHIO_BOOST_MPL_LIMIT_CONTAINER_SIZE"
#endif
#endif
//#endif // ifndef PINOCCHIO_WITH_CXX11_SUPPORT
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment