make the library modular usable.

This commit is contained in:
Rene Rivera 2024-03-11 08:38:17 -05:00 committed by Dmitry Arkhipov
parent 324a7eb147
commit 18fe2b4f3b
6 changed files with 50 additions and 26 deletions

15
Jamfile
View File

@ -1,15 +0,0 @@
#
# Copyright (c) 2019 Vinnie Falco (vinnie dot falco at gmail dot 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)
#
# Official repository: https://github.com/boostorg/json
#
import feature ;
build-project bench ;
build-project test ;
build-project fuzzing ;
build-project example ;

View File

@ -7,13 +7,13 @@
# Official repository: https://github.com/boostorg/json
#
import bench ;
import common ;
import feature ;
import notfile ;
import os ;
import path ;
import property ;
import bench.jam ;
import feature ;
path-constant HERE : . ;

35
build.jam Normal file
View File

@ -0,0 +1,35 @@
# Copyright René Ferdinand Rivera Morell 2023-2024
# 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)
require-b2 5.2 ;
constant boost_dependencies :
/boost/align//boost_align
/boost/assert//boost_assert
/boost/config//boost_config
/boost/container//boost_container
/boost/container_hash//boost_container_hash
/boost/core//boost_core
/boost/describe//boost_describe
/boost/endian//boost_endian
/boost/mp11//boost_mp11
/boost/static_assert//boost_static_assert
/boost/system//boost_system
/boost/throw_exception//boost_throw_exception ;
project /boost/json
: common-requirements
<include>include
;
alias boost_json : build//boost_json ;
alias json_deps : build//json_deps ;
alias json_sources : build//json_sources ;
alias all : boost_json json_deps json_sources bench example fuzzing test ;
call-if : boost-library json
: install boost_json
;

View File

@ -9,7 +9,8 @@
#
import modules ;
import ../../config/checks/config ;
import-search /boost/config/checks ;
import config ;
# These make sure we only build on compatible C++11 or later toolchains.
obj cxx11_basic_alignas : ../check/basic_alignas.cpp ;
@ -54,7 +55,8 @@ rule warn-if-requested ( properties * )
}
}
project boost/json
project
: common-requirements <use>$(boost_dependencies)/<warnings-as-errors>off
: requirements
[ requires
config/cxx11_constexpr
@ -74,18 +76,19 @@ project boost/json
<link>shared:<define>BOOST_JSON_DYN_LINK=1
<link>static:<define>BOOST_JSON_STATIC_LINK=1
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
<define>BOOST_JSON_NO_LIB=1
: source-location ../src
;
alias json_deps
: usage-requirements
<library>/boost//container/<warnings-as-errors>off
<library>/boost/container//boost_container/<warnings-as-errors>off
;
alias json_sources
: src.cpp
: usage-requirements
<library>/boost//container/<warnings-as-errors>off
<library>/boost/container//boost_container/<warnings-as-errors>off
;
explicit json_deps json_sources ;
@ -93,7 +96,5 @@ explicit json_deps json_sources ;
lib boost_json
: json_sources
: usage-requirements
<library>/boost//container/<warnings-as-errors>off
<library>/boost/container//boost_container/<warnings-as-errors>off
;
boost-install boost_json ;

View File

@ -10,8 +10,10 @@
project json/doc ;
import-search /boost/docca ;
import boostbook ;
import ../../../tools/docca/docca.jam ;
import docca ;
import path ;
local include-prefix = [ path.root $(__file__:D) [ path.pwd ] ] ;

View File

@ -16,6 +16,7 @@ import os ;
import path ;
import property ;
import sequence ;
import testing ;
# set the maximum size of the input, to avoid