Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for modular build structure. #1030

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions Jamfile

This file was deleted.

1 change: 1 addition & 0 deletions bench/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import common ;
import os ;
import path ;
import property ;
import notfile ;
import bench.jam ;

import feature ;
Expand Down
37 changes: 37 additions & 0 deletions build.jam
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# 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 :
grisumbras marked this conversation as resolved.
Show resolved Hide resolved
/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
;

explicit
grisumbras marked this conversation as resolved.
Show resolved Hide resolved
[ alias boost_json : build//boost_json ]
grisumbras marked this conversation as resolved.
Show resolved Hide resolved
[ 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
;

15 changes: 8 additions & 7 deletions build/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 ;
Expand Down Expand Up @@ -54,7 +55,8 @@ rule warn-if-requested ( properties * )
}
}

project boost/json
project
: common-requirements <library>$(boost_dependencies)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be <use>?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, through local testing I discovered, that I need

<use>$(boost_dependencies)/<warnings-as-errors>off

: requirements
[ requires
config/cxx11_constexpr
Expand All @@ -74,26 +76,25 @@ 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
grisumbras marked this conversation as resolved.
Show resolved Hide resolved
: 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 ;

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 ;
3 changes: 2 additions & 1 deletion doc/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
project json/doc ;

import boostbook ;
import ../../../tools/docca/docca.jam ;
import-search /boost/docca ;
import docca ;
import path ;

local include-prefix = [ path.root $(__file__:D) [ path.pwd ] ] ;
Expand Down
1 change: 1 addition & 0 deletions fuzzing/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import os ;
import path ;
import property ;
import sequence ;
import testing ;


# set the maximum size of the input, to avoid
Expand Down
Loading