diff --git a/build.jam b/build.jam new file mode 100644 index 00000000..b43f430b --- /dev/null +++ b/build.jam @@ -0,0 +1,40 @@ +# Copyright René Ferdinand Rivera Morell 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/assert//boost_assert + /boost/compute//boost_compute + /boost/config//boost_config + /boost/core//boost_core + /boost/fusion//boost_fusion + /boost/iterator//boost_iterator + /boost/math//boost_math_tr1 + /boost/mpi//boost_mpi + /boost/mpl//boost_mpl + /boost/multi_array//boost_multi_array + /boost/ublas//boost_ublas + /boost/preprocessor//boost_preprocessor + /boost/range//boost_range + /boost/static_assert//boost_static_assert + /boost/throw_exception//boost_throw_exception + /boost/type_traits//boost_type_traits + /boost/units//boost_units + /boost/utility//boost_utility ; + +project /boost/odeint + : common-requirements + include + ; + +explicit + [ alias boost_odeint : : : : $(boost_dependencies) ] + [ alias all : boost_odeint examples performance test ] + ; + +call-if : boost-library odeint + ; + diff --git a/examples/2d_lattice/Jamfile.v2 b/examples/2d_lattice/Jamfile.v2 index c995ec16..67459744 100644 --- a/examples/2d_lattice/Jamfile.v2 +++ b/examples/2d_lattice/Jamfile.v2 @@ -6,7 +6,6 @@ project : requirements - ../../../../.. BOOST_ALL_NO_LIB=1 ; diff --git a/examples/Jamfile.v2 b/examples/Jamfile.v2 index 11813c84..8c5785f1 100644 --- a/examples/Jamfile.v2 +++ b/examples/Jamfile.v2 @@ -5,13 +5,16 @@ # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) +using python ; project - : requirements + : requirements + /boost/odeint//boost_odeint BOOST_ALL_NO_LIB=1 - : + /python//python + : ; - + exe harmonic_oscillator : harmonic_oscillator.cpp ; exe solar_system : solar_system.cpp ; @@ -36,12 +39,12 @@ exe stochastic_euler : stochastic_euler.cpp ; exe generation_functions : generation_functions.cpp ; exe heun : heun.cpp ; exe bind_member_functions : bind_member_functions.cpp ; -exe bind_member_functions_cpp11 : bind_member_functions_cpp11.cpp : -std=c++0x ; -exe molecular_dynamics : molecular_dynamics.cpp : -std=c++0x ; -exe molecular_dynamics_cells : molecular_dynamics_cells.cpp : -std=c++0x ; +exe bind_member_functions_cpp11 : bind_member_functions_cpp11.cpp : 14 ; +exe molecular_dynamics : molecular_dynamics.cpp : 14 ; +exe molecular_dynamics_cells : molecular_dynamics_cells.cpp : 14 ; exe abm_precision : abm_precision.cpp ; exe integrate_times : integrate_times.cpp ; -exe find_crossing : find_crossing.cpp : -std=c++0x ; +exe find_crossing : find_crossing.cpp : 14 ; build-project multiprecision ; # build-project mtl ; diff --git a/examples/mpi/Jamfile.v2 b/examples/mpi/Jamfile.v2 index d3f18eb2..dcecc017 100644 --- a/examples/mpi/Jamfile.v2 +++ b/examples/mpi/Jamfile.v2 @@ -8,8 +8,8 @@ project : requirements BOOST_ALL_NO_LIB=1 - /boost//mpi - /boost//timer + /boost/mpi//boost_mpi + /boost/timer//boost_timer ; exe phase_chain : phase_chain.cpp ; diff --git a/examples/multiprecision/Jamfile b/examples/multiprecision/Jamfile index 9708d434..4fee20a2 100644 --- a/examples/multiprecision/Jamfile +++ b/examples/multiprecision/Jamfile @@ -6,11 +6,12 @@ project - : requirements + : requirements BOOST_ALL_NO_LIB=1 - : + /boost/multiprecision//boost_multiprecision + : ; - + exe lorenz_mp : lorenz_mp.cpp ; exe cmp_precision : cmp_precision.cpp ; diff --git a/examples/nt2/Jamfile.v2 b/examples/nt2/Jamfile.v2 index 05847cd1..626a8062 100644 --- a/examples/nt2/Jamfile.v2 +++ b/examples/nt2/Jamfile.v2 @@ -7,8 +7,6 @@ # http://www.boost.org/LICENSE_1_0.txt #============================================================================== -use-project boost : $(BOOST_ROOT) ; - import os ; # This must be built using an NT2 installation. diff --git a/examples/openmp/Jamfile.v2 b/examples/openmp/Jamfile.v2 index cef4f670..3723896f 100644 --- a/examples/openmp/Jamfile.v2 +++ b/examples/openmp/Jamfile.v2 @@ -5,14 +5,13 @@ # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) -use-project /boost : $(BOOST_ROOT) ; import openmp : * ; project : requirements .. BOOST_ALL_NO_LIB=1 - /boost//timer + /boost/timer//boost_timer [ openmp ] ; diff --git a/examples/quadmath/Jamfile.v2 b/examples/quadmath/Jamfile.v2 index 88a04632..7fd1d4d8 100644 --- a/examples/quadmath/Jamfile.v2 +++ b/examples/quadmath/Jamfile.v2 @@ -13,4 +13,4 @@ project lib quadmath : : quadmath shared ; -exe black_hole : black_hole.cpp quadmath : -std=c++0x ; \ No newline at end of file +exe black_hole : black_hole.cpp quadmath : 14 ; \ No newline at end of file diff --git a/examples/vexcl/Jamfile.v2 b/examples/vexcl/Jamfile.v2 index 73dc8dae..5749fd5a 100644 --- a/examples/vexcl/Jamfile.v2 +++ b/examples/vexcl/Jamfile.v2 @@ -9,9 +9,6 @@ import boost ; import os ; -boost.use-project ; - - # change these lines to fit you configuration local HOME = [ os.environ HOME ] ; local VEXCL_INCLUDE = [ os.environ VEXCL_ROOT ] ; @@ -22,11 +19,10 @@ OPENCL_INCLUDE = /usr/local/cuda/include ; lib opencl : : OpenCL ; project : requirements - /boost//headers $(VEXCL_INCLUDE) $(OPENCL_INCLUDE) gcc:-std=c++0x - /boost//system/ + /boost/system//boost_system ; exe lorenz_ensemble : lorenz_ensemble.cpp opencl ; \ No newline at end of file diff --git a/performance/Jamfile.v2 b/performance/Jamfile.v2 index e60e4ea1..0e22a4e0 100644 --- a/performance/Jamfile.v2 +++ b/performance/Jamfile.v2 @@ -5,19 +5,19 @@ import os ; import modules ; -import path ; +import path ; project : requirements + /boost/odeint//boost_odeint BOOST_ALL_NO_LIB=1 - ../../../.. - -std=c++11 + 11 gcc:-ffast-math intel:"-fast -inline-forceinline" : default-build release ; - - + + lib libgsl : : gsl ; lib libgslcblas : : gslcblas ; @@ -29,4 +29,5 @@ lib libpthread : : pthread ; exe odeint_rk4_array : odeint_rk4_array.cpp + /boost/timer//boost_timer ; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 9a6df98d..905f5dd9 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -8,22 +8,15 @@ # bring in rules for testing import testing ; -import ../../config/checks/config : requires ; - -# make sure you are using a new version of boost.build, otherwise the local -# odeint will not be included properly -# you can fix older boost.build versions by applying the patch provided in -# odeint's root, e.g.: -# cd ~/odeint-v2 -# sudo patch /usr/share/boost-build/build/toolset.jam toolset.jam.patch - -use-project boost : $(BOOST_ROOT) ; +import-search /boost/config/checks ; +import config : requires ; project : requirements + /boost/odeint//boost_odeint BOOST_ALL_NO_LIB=1 # use test library - /boost//unit_test_framework + /boost/test//boost_unit_test_framework static clang:-Wno-unused-variable # -D_SCL_SECURE_NO_WARNINGS @@ -33,9 +26,9 @@ test-suite "odeint" : [ run euler_stepper.cpp ] # The following 3 tests use Boost.Multiprecision which requires C++14 - [ run runge_kutta_concepts.cpp : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ requires cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx14_variable_templates cxx14_constexpr ] ] - [ run runge_kutta_error_concepts.cpp : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ requires cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx14_variable_templates cxx14_constexpr ] ] - [ run runge_kutta_controlled_concepts.cpp : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ requires cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx14_variable_templates cxx14_constexpr ] ] + [ run runge_kutta_concepts.cpp /boost/multiprecision//boost_multiprecision : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ requires cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx14_variable_templates cxx14_constexpr ] ] + [ run runge_kutta_error_concepts.cpp /boost/multiprecision//boost_multiprecision : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ requires cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx14_variable_templates cxx14_constexpr ] ] + [ run runge_kutta_controlled_concepts.cpp /boost/multiprecision//boost_multiprecision : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ requires cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx14_variable_templates cxx14_constexpr ] ] [ run resizing.cpp ] [ run default_operations.cpp ] [ run range_algebra.cpp ] @@ -46,7 +39,7 @@ test-suite "odeint" [ run stepper_copying.cpp ] [ run stepper_with_ranges.cpp ] [ run rosenbrock4.cpp ] - [ run rosenbrock4_mp.cpp ] + [ run rosenbrock4_mp.cpp /boost/multiprecision//boost_multiprecision ] [ run is_pair.cpp ] [ run adams_bashforth.cpp ] [ run adams_moulton.cpp ] @@ -88,10 +81,10 @@ test-suite "odeint" [ compile unwrap_boost_reference.cpp ] [ compile unwrap_reference.cpp ] [ compile std_array.cpp ] - : + : valgrind ; - + # also run numeric tests build-project numeric ; diff --git a/test/numeric/Jamfile.v2 b/test/numeric/Jamfile.v2 index a4643f6a..2df2ffd2 100644 --- a/test/numeric/Jamfile.v2 +++ b/test/numeric/Jamfile.v2 @@ -8,13 +8,11 @@ import testing ; -use-project boost : $(BOOST_ROOT) ; - project : requirements /boost/test//boost_unit_test_framework + /boost/format//boost_format BOOST_ALL_NO_LIB=1 - ../../include static clang:-Wno-unused-variable diff --git a/test/regression/Jamfile.v2 b/test/regression/Jamfile.v2 index c476822f..f3741874 100644 --- a/test/regression/Jamfile.v2 +++ b/test/regression/Jamfile.v2 @@ -5,17 +5,15 @@ # bring in rules for testing - +require-b2 5.0.1 ; +import-search /boost/config/checks ; import testing ; -import ../../config/checks/config : requires ; - -use-project boost : $(BOOST_ROOT) ; +import config : requires ; project : requirements /boost/test//boost_unit_test_framework BOOST_ALL_NO_LIB=1 - ../../include static clang:-Wno-unused-variable diff --git a/test_external/eigen/Jamfile.v2 b/test_external/eigen/Jamfile.v2 index ad0cc2d2..7074f8df 100644 --- a/test_external/eigen/Jamfile.v2 +++ b/test_external/eigen/Jamfile.v2 @@ -9,8 +9,6 @@ import testing ; import os ; -use-project boost : $(BOOST_ROOT) ; - local EIGEN_ROOT = [ os.environ EIGEN_ROOT ] ; project diff --git a/test_external/gmp/Jamfile.v2 b/test_external/gmp/Jamfile.v2 index f0e6af02..ee25ee90 100644 --- a/test_external/gmp/Jamfile.v2 +++ b/test_external/gmp/Jamfile.v2 @@ -6,7 +6,6 @@ # bring in rules for testing import testing ; -use-project boost : $(BOOST_ROOT) ; project gmp : requirements diff --git a/test_external/gsl/Jamfile.v2 b/test_external/gsl/Jamfile.v2 index 086edf6e..7c0f18dd 100644 --- a/test_external/gsl/Jamfile.v2 +++ b/test_external/gsl/Jamfile.v2 @@ -6,7 +6,6 @@ # bring in rules for testing import testing ; -use-project boost : $(BOOST_ROOT) ; project : requirements diff --git a/test_external/mkl/Jamfile.v2 b/test_external/mkl/Jamfile.v2 index f585fa83..a6243c0b 100644 --- a/test_external/mkl/Jamfile.v2 +++ b/test_external/mkl/Jamfile.v2 @@ -6,7 +6,6 @@ # bring in rules for testing import testing ; -use-project boost : $(BOOST_ROOT) ; project : requirements diff --git a/test_external/mpi/Jamfile.v2 b/test_external/mpi/Jamfile.v2 index 0a02bccf..b83980e9 100644 --- a/test_external/mpi/Jamfile.v2 +++ b/test_external/mpi/Jamfile.v2 @@ -7,12 +7,10 @@ import testing ; import mpi : mpi-test ; -use-project boost : $(BOOST_ROOT) ; - project : requirements /boost/test//boost_unit_test_framework - /boost//mpi + /boost/mpi//boost_mpi static BOOST_ALL_NO_LIB=1 ; diff --git a/test_external/mtl4/Jamfile.v2 b/test_external/mtl4/Jamfile.v2 index de9d87f2..e1819383 100644 --- a/test_external/mtl4/Jamfile.v2 +++ b/test_external/mtl4/Jamfile.v2 @@ -7,9 +7,6 @@ import testing ; import boost ; -# boost.use-project ; -use-project boost : $(BOOST_ROOT) ; - # set your MTL4 directory here MTL4_INCLUDE = /home/mario/MTL4/usr/include ; diff --git a/test_external/nt2/Jamfile.v2 b/test_external/nt2/Jamfile.v2 index 26763da6..2520bed2 100644 --- a/test_external/nt2/Jamfile.v2 +++ b/test_external/nt2/Jamfile.v2 @@ -20,11 +20,9 @@ import os ; local NT2_ROOT_PATH = [ os.environ NT2_ROOT_PATH ] ; local NT2_SIMD_FLAGS = [ os.environ NT2_SIMD_FLAGS ] ; -use-project boost : $(BOOST_ROOT) ; - project : requirements - $(BOOST_ROOT)/boost/test/included/unit_test_framework.hpp + /boost/test//included BOOST_ALL_NO_LIB=1 $(NT2_ROOT_PATH)/include/ static diff --git a/test_external/vexcl/Jamfile.v2 b/test_external/vexcl/Jamfile.v2 index 9b76b430..f427dcb2 100644 --- a/test_external/vexcl/Jamfile.v2 +++ b/test_external/vexcl/Jamfile.v2 @@ -8,7 +8,6 @@ import testing ; -use-project boost : $(BOOST_ROOT) ; VEXCL_INCLUDE = /home/karsten/boost/testing/vexcl ; OPENCL_INCLUDE = /usr/local/cuda/include ; #OPENCL_INCLUDE = /usr/include ; @@ -20,7 +19,7 @@ project $(VEXCL_INCLUDE) $(OPENCL_INCLUDE) -std=c++0x - /boost//system/ + /boost/system//boost_system ; lib OpenCL : : OpenCL shared ;