diff --git a/Jamfile.v2 b/Jamfile.v2 deleted file mode 100644 index 4e921c64..00000000 --- a/Jamfile.v2 +++ /dev/null @@ -1,14 +0,0 @@ -# Boost.Contract Library Jamfile -# -# Use, modification, and distribution are subject to 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) - -# please order by name to ease maintenance (this is used by CI) -# -# CI build of examples disabled at repository owner's request (examples are -# meant for docs so for simplicity might omit work-around to build on all plat) -# build-project example ; -# -build-project test ; - diff --git a/build.jam b/build.jam new file mode 100644 index 00000000..2960027b --- /dev/null +++ b/build.jam @@ -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 : + /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 + ; + +explicit + [ alias boost_contract : build//boost_contract ] + [ alias all : boost_contract example test ] + ; + +call-if : boost-library contract + : install boost_contract + ; + diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 3894232a..2938b7cc 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -4,20 +4,18 @@ # 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 - : requirements + : common-requirements + $(boost_dependencies) + ../include shared:BOOST_CONTRACT_DYN_LINK static:BOOST_CONTRACT_STATIC_LINK single:BOOST_CONTRACT_DISABLE_THREADS : usage-requirements # Independent from requirements above (need to repeat). - shared:BOOST_CONTRACT_DYN_LINK - static:BOOST_CONTRACT_STATIC_LINK - single:BOOST_CONTRACT_DISABLE_THREADS + BOOST_CONTRACT_NO_LIB=1 ; # If lib as header-only, none of following will be used. lib boost_contract : contract.cpp : shared ; lib boost_contract : contract.cpp : static ; - -boost-install boost_contract ; diff --git a/build/boost_contract_build.jam b/build/boost_contract_build.jam index 06b7869b..7b034085 100644 --- a/build/boost_contract_build.jam +++ b/build/boost_contract_build.jam @@ -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 @@ -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 : @@ -64,7 +64,7 @@ for local comb in [ boost_contract_no.combinations ] { } module boost_contract_build { - + rule project_requirements ( subdir ) { return lib:../build//boost_contract diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2 index 3c104a1c..7ceecead 100644 --- a/doc/Jamfile.v2 +++ b/doc/Jamfile.v2 @@ -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 @@ -36,7 +36,7 @@ doxygen reference ../include/boost/contract/core/specify.hpp ../include/boost/contract/core/virtual.hpp ] -: +: "Reference" # Quickbook's Doxygen does not show destructor exception specs. PREDEFINED="BOOST_CONTRACT_DETAIL_DOXYGEN BOOST_PP_VARIADICS" @@ -67,10 +67,11 @@ boostbook boostrelease : contract pdf:admon.graphics.extension=".svg" pdf:img.src.path=$(images_location)/ pdf:draft.mode="no" - + ; install pdfinstall : doc/pdf : . PDF local_function.pdf ; explicit pdfinstall ; +explicit [ alias boostdoc ] ; diff --git a/example/Jamfile.v2 b/example/Jamfile.v2 index 3fe6e2fa..95bb7a9e 100644 --- a/example/Jamfile.v2 +++ b/example/Jamfile.v2 @@ -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 ] @@ -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 ] @@ -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 : + /boost/local_function//boost_local_function ] ; test-suite n1962 : diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 2026b8de..ac6a21a9 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -4,8 +4,15 @@ # 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 ; + +project + : requirements + /boost/iostreams//boost_iostreams + ; test-suite constructor : [ boost_contract_build.subdir-run-cxx11 constructor : smoke ] @@ -14,12 +21,12 @@ test-suite constructor : [ boost_contract_build.subdir-run-cxx11 constructor : decl_pre_ends ] [ boost_contract_build.subdir-run-cxx11 constructor : decl_pre_mid ] [ boost_contract_build.subdir-run-cxx11 constructor : decl_pre_none ] - + [ boost_contract_build.subdir-run-cxx11 constructor : decl_post_all ] [ boost_contract_build.subdir-run-cxx11 constructor : decl_post_ends ] [ boost_contract_build.subdir-run-cxx11 constructor : decl_post_mid ] [ boost_contract_build.subdir-run-cxx11 constructor : decl_post_none ] - + [ boost_contract_build.subdir-run-cxx11 constructor : decl_entry_static_inv_all ] [ boost_contract_build.subdir-run-cxx11 constructor : @@ -28,7 +35,7 @@ test-suite constructor : decl_entry_static_inv_mid ] [ boost_contract_build.subdir-run-cxx11 constructor : decl_entry_static_inv_none ] - + [ boost_contract_build.subdir-run-cxx11 constructor : decl_exit_static_inv_all ] [ boost_contract_build.subdir-run-cxx11 constructor : @@ -37,16 +44,16 @@ test-suite constructor : decl_exit_static_inv_mid ] [ boost_contract_build.subdir-run-cxx11 constructor : decl_exit_static_inv_none ] - + # No decl_entry_static_inv_... (as no obj before ctor). [ boost_contract_build.subdir-run-cxx11 constructor : decl_exit_inv_all ] [ boost_contract_build.subdir-run-cxx11 constructor : decl_exit_inv_ends ] [ boost_contract_build.subdir-run-cxx11 constructor : decl_exit_inv_mid ] [ boost_contract_build.subdir-run-cxx11 constructor : decl_exit_inv_none ] - + [ boost_contract_build.subdir-run-cxx11 constructor : access ] - + [ boost_contract_build.subdir-run-cxx11 constructor : ifdef ] [ boost_contract_build.subdir-run-cxx11 constructor : ifdef_macro ] @@ -55,7 +62,7 @@ test-suite constructor : [ boost_contract_build.subdir-run-cxx11 constructor : throwing_body ] [ boost_contract_build.subdir-run-cxx11 constructor : throwing_post ] # No throwing_except test (as throwing twice calls terminate). - + [ boost_contract_build.subdir-compile-fail-cxx11 constructor : pre_error ] ; @@ -63,12 +70,12 @@ test-suite destructor : [ boost_contract_build.subdir-run-cxx11 destructor : smoke ] # No decl_pre_... (as dtors have no pre). - + [ boost_contract_build.subdir-run-cxx11 destructor : decl_post_all ] [ boost_contract_build.subdir-run-cxx11 destructor : decl_post_ends ] [ boost_contract_build.subdir-run-cxx11 destructor : decl_post_mid ] [ boost_contract_build.subdir-run-cxx11 destructor : decl_post_none ] - + [ boost_contract_build.subdir-run-cxx11 destructor : decl_entry_static_inv_all ] [ boost_contract_build.subdir-run-cxx11 destructor : @@ -77,7 +84,7 @@ test-suite destructor : decl_entry_static_inv_mid ] [ boost_contract_build.subdir-run-cxx11 destructor : decl_entry_static_inv_none ] - + [ boost_contract_build.subdir-run-cxx11 destructor : decl_exit_static_inv_all ] [ boost_contract_build.subdir-run-cxx11 destructor : @@ -86,14 +93,14 @@ test-suite destructor : decl_exit_static_inv_mid ] [ boost_contract_build.subdir-run-cxx11 destructor : decl_exit_static_inv_none ] - + [ boost_contract_build.subdir-run-cxx11 destructor : decl_entry_inv_all ] [ boost_contract_build.subdir-run-cxx11 destructor : decl_entry_inv_ends ] [ boost_contract_build.subdir-run-cxx11 destructor : decl_entry_inv_mid ] [ boost_contract_build.subdir-run-cxx11 destructor : decl_entry_inv_none ] # No decl_exit_inv_... (as no obj after dtor). - + [ boost_contract_build.subdir-run-cxx11 destructor : access ] [ boost_contract_build.subdir-run-cxx11 destructor : ifdef ] @@ -120,7 +127,7 @@ test-suite public_function : [ boost_contract_build.subdir-run-cxx11 public_function : decl_post_ends ] [ boost_contract_build.subdir-run-cxx11 public_function : decl_post_mid ] [ boost_contract_build.subdir-run-cxx11 public_function : decl_post_none ] - + [ boost_contract_build.subdir-run-cxx11 public_function : decl_entry_static_inv_all ] [ boost_contract_build.subdir-run-cxx11 public_function : @@ -129,7 +136,7 @@ test-suite public_function : decl_entry_static_inv_mid ] [ boost_contract_build.subdir-run-cxx11 public_function : decl_entry_static_inv_none ] - + [ boost_contract_build.subdir-run-cxx11 public_function : decl_exit_static_inv_all ] [ boost_contract_build.subdir-run-cxx11 public_function : @@ -138,7 +145,7 @@ test-suite public_function : decl_exit_static_inv_mid ] [ boost_contract_build.subdir-run-cxx11 public_function : decl_exit_static_inv_none ] - + [ boost_contract_build.subdir-run-cxx11 public_function : decl_entry_inv_all ] [ boost_contract_build.subdir-run-cxx11 public_function : @@ -147,7 +154,7 @@ test-suite public_function : decl_entry_inv_mid ] [ boost_contract_build.subdir-run-cxx11 public_function : decl_entry_inv_none ] - + [ boost_contract_build.subdir-run-cxx11 public_function : decl_exit_inv_all ] [ boost_contract_build.subdir-run-cxx11 public_function : @@ -156,9 +163,9 @@ test-suite public_function : decl_exit_inv_mid ] [ boost_contract_build.subdir-run-cxx11 public_function : decl_exit_inv_none ] - + [ boost_contract_build.subdir-run-cxx11 public_function : access ] - + [ boost_contract_build.subdir-run-cxx11 public_function : ifdef ] [ boost_contract_build.subdir-run-cxx11 public_function : ifdef_macro ] @@ -174,7 +181,7 @@ test-suite public_function : [ boost_contract_build.subdir-compile-fail public_function : protected_error ] [ boost_contract_build.subdir-run-cxx11 public_function : friend ] - + [ boost_contract_build.subdir-run-cxx11 public_function : throwing_pre ] [ boost_contract_build.subdir-run-cxx11 public_function : throwing_old ] [ boost_contract_build.subdir-run-cxx11 public_function : throwing_body ] @@ -184,7 +191,7 @@ test-suite public_function : throwing_body_virtual_branch ] [ boost_contract_build.subdir-run-cxx11 public_function : throwing_post ] # No throwing_except test (as throwing twice calls terminate). - + [ boost_contract_build.subdir-run-cxx11 public_function : max_args0 : BOOST_CONTRACT_MAX_ARGS=0 ] [ boost_contract_build.subdir-run-cxx11 public_function : max_args0_no_tva : @@ -206,10 +213,10 @@ test-suite public_function : [ boost_contract_build.subdir-run-cxx11 public_function : max_args ] [ boost_contract_build.subdir-run-cxx11 public_function : max_args_no_tva : BOOST_NO_CXX11_VARIADIC_TEMPLATES ] - + [ boost_contract_build.subdir-run-cxx11 public_function : max_bases ] # C++11 for BASES(...) variadic macros. - + [ boost_contract_build.subdir-run-cxx11 public_function : overload ] [ boost_contract_build.subdir-run-cxx11 public_function : overload_no_tva : BOOST_NO_CXX11_VARIADIC_TEMPLATES ] @@ -218,7 +225,7 @@ test-suite public_function : override_error ] # C++11 for BASES(...) variadic macros. [ boost_contract_build.subdir-run-cxx11 public_function : # C++11 for BASES. override_permissive : BOOST_CONTRACT_PERMISSIVE ] - + [ boost_contract_build.subdir-run-cxx11 public_function : static ] [ boost_contract_build.subdir-run-cxx11 public_function : static_ifdef ] [ boost_contract_build.subdir-run-cxx11 public_function : @@ -233,7 +240,7 @@ test-suite public_function : static_throwing_post ] # No throwing_except test (as throwing twice calls terminate). ; - + test-suite invariant : [ boost_contract_build.subdir-run-cxx11 invariant : decl_static_cv_const ] [ boost_contract_build.subdir-run-cxx11 invariant : decl_static_cv ] @@ -243,7 +250,7 @@ test-suite invariant : [ boost_contract_build.subdir-run-cxx11 invariant : decl_cv ] [ boost_contract_build.subdir-run-cxx11 invariant : decl_const ] [ boost_contract_build.subdir-run-cxx11 invariant : decl_nothing ] - + [ boost_contract_build.subdir-run invariant : ifdef ] [ boost_contract_build.subdir-run-cxx11 invariant : ifdef_macro ] @@ -261,7 +268,7 @@ test-suite invariant : [ boost_contract_build.subdir-compile-fail invariant : static_cv_error ] [ boost_contract_build.subdir-run invariant : static_cv_permissive : BOOST_CONTRACT_PERMISSIVE ] - + [ boost_contract_build.subdir-compile-fail invariant : static_error ] [ boost_contract_build.subdir-run invariant : static_permissive : BOOST_CONTRACT_PERMISSIVE ] @@ -278,7 +285,7 @@ test-suite function : [ boost_contract_build.subdir-run-cxx11 function : decl_pre_all ] [ boost_contract_build.subdir-run-cxx11 function : decl_pre_none ] - + [ boost_contract_build.subdir-run-cxx11 function : decl_post_all ] [ boost_contract_build.subdir-run-cxx11 function : decl_post_none ] @@ -295,10 +302,10 @@ test-suite function : test-suite check : [ boost_contract_build.subdir-run-cxx11 check : decl_class ] [ boost_contract_build.subdir-run-cxx11 check : decl_macro ] - + [ boost_contract_build.subdir-run-cxx11 check : ifdef ] [ boost_contract_build.subdir-run-cxx11 check : ifdef_macro ] - + [ boost_contract_build.subdir-run-cxx11 check : audit : BOOST_CONTRACT_AUDITS ] [ boost_contract_build.subdir-compile-fail-cxx11 check : audit_error ] @@ -331,7 +338,7 @@ test-suite old : [ boost_contract_build.subdir-run-cxx11 old : if_copyable ] [ boost_contract_build.subdir-compile-fail-cxx11 old : if_copyable_error ] [ boost_contract_build.subdir-run-cxx11 old : if_copyable_macro ] - + [ boost_contract_build.subdir-run old : copyable_traits ] ; @@ -348,10 +355,10 @@ test-suite disable : ] [ boost_contract_build.subdir-run-cxx11 disable : other_assertions_lib : disable-lib_a disable-lib_b ] - + [ boost_contract_build.subdir-run-cxx11 disable : other_assertions_unit disable/lib_a.cpp disable/lib_b.cpp ] - + [ boost_contract_build.subdir-lib-cxx11 disable : lib_x : BOOST_CONTRACT_NO_POSTCONDITIONS BOOST_CONTRACT_NO_EXCEPTS @@ -365,13 +372,13 @@ test-suite disable : ] [ boost_contract_build.subdir-run-cxx11 disable : no_post_except_lib : disable-lib_x disable-lib_y ] - + [ boost_contract_build.subdir-run-cxx11 disable : no_post_except_unit disable/lib_x.cpp disable/lib_y.cpp : BOOST_CONTRACT_NO_POSTCONDITIONS BOOST_CONTRACT_NO_EXCEPTS ] - + [ boost_contract_build.subdir-run disable : audit : BOOST_CONTRACT_AUDITS ] [ boost_contract_build.subdir-compile-fail disable : audit_error ] @@ -383,7 +390,7 @@ test-suite disable : test-suite specify : [ boost_contract_build.subdir-run-cxx11 specify : pre_old_post_except ] - + [ boost_contract_build.subdir-run-cxx11 specify : pre_old_post ] [ boost_contract_build.subdir-run-cxx11 specify : pre_old_except ] [ boost_contract_build.subdir-run-cxx11 specify : pre_post_except ] @@ -402,7 +409,7 @@ test-suite specify : [ boost_contract_build.subdir-run-cxx11 specify : except ] [ boost_contract_build.subdir-run specify : nothing ] - + [ boost_contract_build.subdir-compile-fail-cxx11 specify : except_post_error ] [ boost_contract_build.subdir-compile-fail-cxx11 specify : @@ -412,7 +419,7 @@ test-suite specify : [ boost_contract_build.subdir-compile-fail-cxx11 specify : post_old_error ] [ boost_contract_build.subdir-compile-fail-cxx11 specify : post_pre_error ] [ boost_contract_build.subdir-compile-fail-cxx11 specify : old_pre_error ] - + [ boost_contract_build.subdir-run-cxx11 specify : missing_check : BOOST_CONTRACT_ON_MISSING_CHECK_DECL=\"\{\ throw\ err()\;\ \}\" ] @@ -437,11 +444,11 @@ test-suite call_if : [ boost_contract_build.subdir-run-cxx11 call_if : true_void ] [ boost_contract_build.subdir-run-cxx11 call_if : false_void ] - + [ boost_contract_build.subdir-run-cxx11 call_if : equal_to ] [ boost_contract_build.subdir-run-cxx11 call_if : equal_to_cxx14 : [ requires cxx14_generic_lambdas ] ] - + [ boost_contract_build.subdir-run-cxx11 call_if : no_equal_condition_if ] [ boost_contract_build.subdir-run-cxx11 call_if : no_equal_call_if ] [ boost_contract_build.subdir-compile-fail-cxx11 call_if : no_equal_error ]