Skip to content

Commit

Permalink
build: modular build structure
Browse files Browse the repository at this point in the history
  • Loading branch information
grafikrobot authored and alandefreitas committed Aug 20, 2024
1 parent dcfe9df commit dc611e8
Show file tree
Hide file tree
Showing 15 changed files with 65 additions and 57 deletions.
20 changes: 0 additions & 20 deletions Jamfile

This file was deleted.

34 changes: 34 additions & 0 deletions build.jam
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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/core//boost_core
/boost/mp11//boost_mp11
/boost/optional//boost_optional
/boost/static_assert//boost_static_assert
/boost/system//boost_system
/boost/type_traits//boost_type_traits
/boost/variant2//boost_variant2 ;

project /boost/url
: common-requirements
<include>include
;

explicit
[ alias boost_url : build//boost_url ]
[ alias url_sources : build//url_sources ]
[ alias all : boost_url url_sources example test ]
;

call-if : boost-library url
: install boost_url
;

25 changes: 22 additions & 3 deletions build/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,27 @@
# Official repository: https://github.com/vinniefalco/url
#

project boost/url
import-search /boost/config/checks ;
import config : requires ;

constant c11-requires :
[ requires
cxx11_constexpr
cxx11_decltype
cxx11_hdr_tuple
cxx11_template_aliases
cxx11_variadic_templates
]
;

constant boost_dependencies_private :
/boost/throw_exception//boost_throw_exception
;

project
: common-requirements <library>$(boost_dependencies)
: requirements
<library>$(boost_dependencies_private)
$(c11-requires)
<define>BOOST_URL_SOURCE
<toolset>msvc-14.0:<build>no
Expand All @@ -19,6 +38,8 @@ project boost/url
: common-requirements
<link>shared:<define>BOOST_URL_DYN_LINK=1
<link>static:<define>BOOST_URL_STATIC_LINK=1
: usage-requirements
<define>BOOST_URL_NO_LIB=1
: source-location ../src
;

Expand All @@ -31,5 +52,3 @@ explicit url_sources ;
lib boost_url
: url_sources
;

boost-install boost_url ;
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 url/doc ;

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


docca.reference reference.qbk
Expand Down
2 changes: 0 additions & 2 deletions example/file_router/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
# Official repository: https://github.com/boostorg/url
#

project : requirements ;

project
: requirements
<library>/boost/url//boost_url
Expand Down
2 changes: 0 additions & 2 deletions example/finicky/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
# Official repository: https://github.com/boostorg/url
#

project : requirements ;

project
: requirements
<library>/boost/url//boost_url
Expand Down
2 changes: 0 additions & 2 deletions example/magnet/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
# Official repository: https://github.com/boostorg/url
#

project : requirements ;

project
: requirements
<library>/boost/url//boost_url
Expand Down
2 changes: 0 additions & 2 deletions example/mailto/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
# Official repository: https://github.com/boostorg/url
#

project : requirements ;

project
: requirements
<library>/boost/url//boost_url
Expand Down
2 changes: 0 additions & 2 deletions example/qrcode/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
# Official repository: https://github.com/boostorg/url
#

project : requirements ;

project
: requirements
<library>/boost/url//boost_url
Expand Down
4 changes: 2 additions & 2 deletions example/router/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
# Official repository: https://github.com/boostorg/url
#

project : requirements ;

project
: requirements
<toolset>clang-4:<warnings-as-errors>off
<toolset>clang-5:<warnings-as-errors>off
<define>BOOST_ASIO_DISABLE_FENCED_BLOCK
<library>/boost/url//boost_url
<library>/boost/beast//boost_beast/<link>static
<library>/boost/beast//boost_beast_asio/<link>static
<toolset>gcc-7:<cxxflags>"-Wno-maybe-uninitialized"
;

Expand Down
2 changes: 0 additions & 2 deletions example/suffix_list/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
# Official repository: https://github.com/boostorg/url
#

project : requirements ;

project
: requirements
<library>/boost/url//boost_url
Expand Down
20 changes: 4 additions & 16 deletions test/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,16 @@ project
<toolset>clang:<cxxflags>"-Wno-unused-but-set-variable"
<toolset>clang:<cxxflags>"-Wno-unused-parameter"
<toolset>gcc,<target-os>windows:<cxxflags>"-Wno-error=array-bounds"
<toolset>clang:<cxxflags>"-Wno-unknown-warning-option"
<toolset>clang-13:<cxxflags>"-Wno-unused-but-set-variable"
<toolset>clang-14:<cxxflags>"-Wno-unused-but-set-variable"
<toolset>clang-15:<cxxflags>"-Wno-unused-but-set-variable"

# Different typeinfos confuse ubsan
<undefined-sanitizer>norecover:<link>static
<undefined-sanitizer>norecover:<visibility>global
;

project
: default-build

<warnings>extra

: requirements

<toolset>gcc:<cxxflags>"-Wno-unused-but-set-variable" # Warnings in dependencies
<toolset>clang:<cxxflags>"-Wno-unknown-warning-option"
<toolset>clang-13:<cxxflags>"-Wno-unused-but-set-variable" # Warnings in dependencies
<toolset>clang-14:<cxxflags>"-Wno-unused-but-set-variable" # Warnings in dependencies
<toolset>clang-15:<cxxflags>"-Wno-unused-but-set-variable" # Warnings in dependencies

;

build-project extra ;
build-project limits ;
build-project unit ;

2 changes: 1 addition & 1 deletion test/extra/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import testing ;

project
: requirements
$(c11-requires)
<source>../../extra/test_main.cpp
<include>.
<include>../../extra
<library>/boost/assert//boost_assert
;


Expand Down
1 change: 0 additions & 1 deletion test/limits/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import testing ;

project
: requirements
$(c11-requires)
<source>../../extra/test_main.cpp
<include>.
<include>../../extra
Expand Down
1 change: 0 additions & 1 deletion test/unit/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import testing ;

project
: requirements
$(c11-requires)
<library>/boost/filesystem//boost_filesystem/<warnings>off
<library>/boost/url//boost_url
<source>../../extra/test_main.cpp
Expand Down

0 comments on commit dc611e8

Please sign in to comment.