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. #34

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 0 additions & 14 deletions Jamfile.v2

This file was deleted.

39 changes: 39 additions & 0 deletions build.jam
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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/any//boost_any
/boost/assert//boost_assert
/boost/config//boost_config
/boost/core//boost_core
/boost/exception//boost_exception
/boost/function//boost_function
/boost/function_types//boost_function_types
/boost/mpl//boost_mpl
/boost/optional//boost_optional
/boost/preprocessor//boost_preprocessor
/boost/smart_ptr//boost_smart_ptr
/boost/static_assert//boost_static_assert
/boost/thread//boost_thread
/boost/type_traits//boost_type_traits
/boost/typeof//boost_typeof
/boost/utility//boost_utility ;

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

explicit
[ alias boost_contract : build//boost_contract ]
[ alias all : boost_contract example test ]
;

call-if : boost-library contract
: install boost_contract
;

6 changes: 3 additions & 3 deletions build/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
# file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
# See: http://www.boost.org/doc/libs/release/libs/contract/doc/html/index.html

project boost/contract
project
: source-location ../src
: common-requirements <library>$(boost_dependencies)
: requirements
<link>shared:<define>BOOST_CONTRACT_DYN_LINK
<link>static:<define>BOOST_CONTRACT_STATIC_LINK
Expand All @@ -14,10 +15,9 @@ project boost/contract
<link>shared:<define>BOOST_CONTRACT_DYN_LINK
<link>static:<define>BOOST_CONTRACT_STATIC_LINK
<threading>single:<define>BOOST_CONTRACT_DISABLE_THREADS
<define>BOOST_CONTRACT_NO_LIB=1
;

# If lib as header-only, none of following will be used.
lib boost_contract : contract.cpp : <link>shared ;
lib boost_contract : contract.cpp : <link>static ;

boost-install boost_contract ;
6 changes: 3 additions & 3 deletions build/boost_contract_build.jam
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Usage: bjam [OPTION]... DIR[-CPP_FILE_NAME]
# Build and run Boost.Contract tests and examples.
#
#
# Options (common to BJam):
# toolset=msvc,gcc,clang,... specify compiler
# cxxstd=03,11,14,17,... specify C++ standard version
Expand Down Expand Up @@ -49,7 +49,7 @@
import boost_contract_no ;
import feature ;
import testing ;
import ../../config/checks/config : requires ;
import config : requires ;

# Iff "no", link to boost_contract (else, no lib build so don't link to it).
feature.feature bc_hdr : lib only :
Expand All @@ -64,7 +64,7 @@ for local comb in [ boost_contract_no.combinations ] {
}

module boost_contract_build {

rule project_requirements ( subdir ) {
return
<bc_hdr>lib:<library>../build//boost_contract
Expand Down
7 changes: 4 additions & 3 deletions doc/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ doxygen reference
[ glob
../include/boost/contract.hpp
../include/boost/contract_macro.hpp

../include/boost/contract/assert.hpp
../include/boost/contract/base_types.hpp
../include/boost/contract/call_if.hpp
Expand All @@ -36,7 +36,7 @@ doxygen reference
../include/boost/contract/core/specify.hpp
../include/boost/contract/core/virtual.hpp
]
:
:
<reftitle>"Reference"
# Quickbook's Doxygen does not show destructor exception specs.
<doxygen:param>PREDEFINED="BOOST_CONTRACT_DETAIL_DOXYGEN BOOST_PP_VARIADICS"
Expand Down Expand Up @@ -67,10 +67,11 @@ boostbook boostrelease : contract
<format>pdf:<xsl:param>admon.graphics.extension=".svg"
<format>pdf:<xsl:param>img.src.path=$(images_location)/
<format>pdf:<xsl:param>draft.mode="no"

;

install pdfinstall : doc/<format>pdf :
<location>. <install-type>PDF <name>local_function.pdf ;
explicit pdfinstall ;

explicit [ alias boostdoc ] ;
9 changes: 6 additions & 3 deletions example/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
# file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
# See: http://www.boost.org/doc/libs/release/libs/contract/doc/html/index.html

require-b2 5.0.1 ;
import-search /boost/config/checks ;
import ../build/boost_contract_build ;
import ../../config/checks/config : requires ;
import config : requires ;

test-suite features :
[ boost_contract_build.subdir-run features : introduction_comments ]
Expand All @@ -25,7 +27,7 @@ test-suite features :
[ boost_contract_build.subdir-run-cxx11 features :
private_protected_virtual_multi ]
[ boost_contract_build.subdir-run-cxx11 features : check ]

[ boost_contract_build.subdir-run-cxx11 features : friend ]
[ boost_contract_build.subdir-run-cxx11 features : friend_invariant ]
[ boost_contract_build.subdir-run-cxx11 features : old ]
Expand Down Expand Up @@ -54,7 +56,8 @@ test-suite features :
[ boost_contract_build.subdir-run-cxx11 features : old_no_macro ]
# Still needs C++11 for OLDOF variadic macros.
[ boost_contract_build.subdir-run-cxx11 features : no_lambdas ]
[ boost_contract_build.subdir-run-cxx11 features : no_lambdas_local_func ]
[ boost_contract_build.subdir-run-cxx11 features : no_lambdas_local_func :
<library>/boost/local_function//boost_local_function ]
;

test-suite n1962 :
Expand Down
Loading