mirror of
https://github.com/msgpack/msgpack-c
synced 2026-06-08 16:11:40 +00:00
Minimall supported build without boost.
To remove boost dependency, `-DMSGPACK_USE_BOOST=OFF` for cmake. By default, `-DMSGPACK_USE_BOOST` is `ON`. NOTE: In order to build tests `-DMSGPACK_USE_BOOST=ON` is required. For C++ compiler, the option `-DMSGPACK_NO_BOOST` is required to remove boost.
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
# /* Copyright (C) 2001
|
||||
# * Housemarque Oy
|
||||
# * http://www.housemarque.com
|
||||
# *
|
||||
# * Distributed under the Boost Software License, Version 1.0. (See
|
||||
# * accompanying file LICENSE_1_0.txt or copy at
|
||||
# * http://www.boost.org/LICENSE_1_0.txt)
|
||||
# */
|
||||
#
|
||||
# /* Revised by Paul Mensonides (2002) */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# ifndef MSGPACK_PREPROCESSOR_DEBUG_ASSERT_HPP
|
||||
# define MSGPACK_PREPROCESSOR_DEBUG_ASSERT_HPP
|
||||
#
|
||||
# include <msgpack/preprocessor/config/config.hpp>
|
||||
# include <msgpack/preprocessor/control/expr_iif.hpp>
|
||||
# include <msgpack/preprocessor/control/iif.hpp>
|
||||
# include <msgpack/preprocessor/logical/not.hpp>
|
||||
# include <msgpack/preprocessor/tuple/eat.hpp>
|
||||
#
|
||||
# /* MSGPACK_PP_ASSERT */
|
||||
#
|
||||
# if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG()
|
||||
# define MSGPACK_PP_ASSERT MSGPACK_PP_ASSERT_D
|
||||
# else
|
||||
# define MSGPACK_PP_ASSERT(cond) MSGPACK_PP_ASSERT_D(cond)
|
||||
# endif
|
||||
#
|
||||
# define MSGPACK_PP_ASSERT_D(cond) MSGPACK_PP_IIF(MSGPACK_PP_NOT(cond), MSGPACK_PP_ASSERT_ERROR, MSGPACK_PP_TUPLE_EAT_1)(...)
|
||||
# define MSGPACK_PP_ASSERT_ERROR(x, y, z)
|
||||
#
|
||||
# /* MSGPACK_PP_ASSERT_MSG */
|
||||
#
|
||||
# if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG()
|
||||
# define MSGPACK_PP_ASSERT_MSG MSGPACK_PP_ASSERT_MSG_D
|
||||
# else
|
||||
# define MSGPACK_PP_ASSERT_MSG(cond, msg) MSGPACK_PP_ASSERT_MSG_D(cond, msg)
|
||||
# endif
|
||||
#
|
||||
# define MSGPACK_PP_ASSERT_MSG_D(cond, msg) MSGPACK_PP_EXPR_IIF(MSGPACK_PP_NOT(cond), msg)
|
||||
#
|
||||
# endif
|
||||
@@ -0,0 +1,33 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Paul Mensonides 2002.
|
||||
# * Distributed under the Boost Software License, Version 1.0. (See
|
||||
# * accompanying file LICENSE_1_0.txt or copy at
|
||||
# * http://www.boost.org/LICENSE_1_0.txt)
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# ifndef MSGPACK_PREPROCESSOR_DEBUG_ERROR_HPP
|
||||
# define MSGPACK_PREPROCESSOR_DEBUG_ERROR_HPP
|
||||
#
|
||||
# include <msgpack/preprocessor/cat.hpp>
|
||||
# include <msgpack/preprocessor/config/config.hpp>
|
||||
#
|
||||
# /* MSGPACK_PP_ERROR */
|
||||
#
|
||||
# if MSGPACK_PP_CONFIG_ERRORS
|
||||
# define MSGPACK_PP_ERROR(code) MSGPACK_PP_CAT(MSGPACK_PP_ERROR_, code)
|
||||
# endif
|
||||
#
|
||||
# define MSGPACK_PP_ERROR_0x0000 MSGPACK_PP_ERROR(0x0000, MSGPACK_PP_INDEX_OUT_OF_BOUNDS)
|
||||
# define MSGPACK_PP_ERROR_0x0001 MSGPACK_PP_ERROR(0x0001, MSGPACK_PP_WHILE_OVERFLOW)
|
||||
# define MSGPACK_PP_ERROR_0x0002 MSGPACK_PP_ERROR(0x0002, MSGPACK_PP_FOR_OVERFLOW)
|
||||
# define MSGPACK_PP_ERROR_0x0003 MSGPACK_PP_ERROR(0x0003, MSGPACK_PP_REPEAT_OVERFLOW)
|
||||
# define MSGPACK_PP_ERROR_0x0004 MSGPACK_PP_ERROR(0x0004, MSGPACK_PP_LIST_FOLD_OVERFLOW)
|
||||
# define MSGPACK_PP_ERROR_0x0005 MSGPACK_PP_ERROR(0x0005, MSGPACK_PP_SEQ_FOLD_OVERFLOW)
|
||||
# define MSGPACK_PP_ERROR_0x0006 MSGPACK_PP_ERROR(0x0006, MSGPACK_PP_ARITHMETIC_OVERFLOW)
|
||||
# define MSGPACK_PP_ERROR_0x0007 MSGPACK_PP_ERROR(0x0007, MSGPACK_PP_DIVISION_BY_ZERO)
|
||||
#
|
||||
# endif
|
||||
@@ -0,0 +1,35 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Paul Mensonides 2002.
|
||||
# * Distributed under the Boost Software License, Version 1.0. (See
|
||||
# * accompanying file LICENSE_1_0.txt or copy at
|
||||
# * http://www.boost.org/LICENSE_1_0.txt)
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# ifndef MSGPACK_PREPROCESSOR_DEBUG_LINE_HPP
|
||||
# define MSGPACK_PREPROCESSOR_DEBUG_LINE_HPP
|
||||
#
|
||||
# include <msgpack/preprocessor/cat.hpp>
|
||||
# include <msgpack/preprocessor/config/config.hpp>
|
||||
# include <msgpack/preprocessor/iteration/iterate.hpp>
|
||||
# include <msgpack/preprocessor/stringize.hpp>
|
||||
#
|
||||
# /* MSGPACK_PP_LINE */
|
||||
#
|
||||
# if MSGPACK_PP_CONFIG_EXTENDED_LINE_INFO
|
||||
# define MSGPACK_PP_LINE(line, file) line MSGPACK_PP_CAT(MSGPACK_PP_LINE_, MSGPACK_PP_IS_ITERATING)(file)
|
||||
# define MSGPACK_PP_LINE_MSGPACK_PP_IS_ITERATING(file) #file
|
||||
# define MSGPACK_PP_LINE_1(file) MSGPACK_PP_STRINGIZE(file MSGPACK_PP_CAT(MSGPACK_PP_LINE_I_, MSGPACK_PP_ITERATION_DEPTH())())
|
||||
# define MSGPACK_PP_LINE_I_1() [MSGPACK_PP_FRAME_ITERATION(1)]
|
||||
# define MSGPACK_PP_LINE_I_2() MSGPACK_PP_LINE_I_1()[MSGPACK_PP_FRAME_ITERATION(2)]
|
||||
# define MSGPACK_PP_LINE_I_3() MSGPACK_PP_LINE_I_2()[MSGPACK_PP_FRAME_ITERATION(3)]
|
||||
# define MSGPACK_PP_LINE_I_4() MSGPACK_PP_LINE_I_3()[MSGPACK_PP_FRAME_ITERATION(4)]
|
||||
# define MSGPACK_PP_LINE_I_5() MSGPACK_PP_LINE_I_4()[MSGPACK_PP_FRAME_ITERATION(5)]
|
||||
# else
|
||||
# define MSGPACK_PP_LINE(line, file) line __FILE__
|
||||
# endif
|
||||
#
|
||||
# endif
|
||||
Reference in New Issue
Block a user