# Copyright (c) 2018 Mateusz Loskot <mateusz@loskot.net>
# Copyright (c) 2019 Hans Dembinski
#
# Use, modification and distribution is 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)

require-b2 5.0.1 ;

import-search /boost/config/checks ;

import testing ;
import config : requires ;

project
    : requirements
    <library>/boost/histogram//boost_histogram
    [ requires
      cxx14_constexpr cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx11_user_defined_literals
      # list could go on...
    ]
    <library>/boost/format//boost_format
    ;

alias cxx14 :
    [ run getting_started_listing_01.cpp ]
    [ run getting_started_listing_02.cpp ]
    [ run getting_started_listing_03.cpp ]
    [ run getting_started_listing_04.cpp ]
    [ run getting_started_listing_05.cpp ]
    [ run guide_axis_basic_demo.cpp ]
    [ run guide_axis_circular.cpp ]
    [ run guide_axis_growing.cpp ]
    [ run guide_axis_with_labels.cpp ]
    [ run guide_axis_with_transform.cpp ]
    [ run guide_axis_with_uoflow_off.cpp ]
    [ run guide_custom_2d_axis.cpp ]
    [ run guide_custom_accumulators_builtin.cpp ]
    [ run guide_custom_accumulators_with_metadata.cpp ]
    [ run guide_custom_accumulators_simple.cpp ]
    [ run guide_custom_accumulators_advanced.cpp ]
    [ run guide_custom_accumulators_ouroboros.cpp ]
    [ run guide_custom_minimal_axis.cpp ]
    [ run guide_custom_modified_axis.cpp ]
    [ run guide_custom_axis_multiple_value_types.cpp ]
    [ run guide_custom_storage.cpp ]
    [ run guide_fill_histogram.cpp ]
    [ run guide_fill_profile.cpp ]
    [ run guide_fill_weighted_histogram.cpp ]
    [ run guide_fill_weighted_profile.cpp ]
    [ run guide_histogram_operators.cpp ]
    [ run guide_histogram_reduction.cpp ]
    [ run guide_histogram_projection.cpp ]
    [ run guide_histogram_streaming.cpp ]
    [ run guide_histogram_in_api.cpp ]
    [ run guide_indexed_access.cpp ]
    [ run guide_make_dynamic_histogram.cpp ]
    [ run guide_make_static_histogram.cpp ]
    [ run guide_stdlib_algorithms.cpp ]
    ;

alias threading :
    [ run guide_parallel_filling.cpp ] :
    <threading>multi
    ;

alias libserial :
    /boost/serialization//boost_serialization :
    <link>static <warnings>off <rtti>on
    ;

alias serial :
    [ run guide_histogram_serialization.cpp libserial ] :
    <warnings>off
    ;

alias all : cxx14 threading serial ;

explicit cxx14 ;
explicit threading ;
explicit libserial ;
explicit serial ;
