#
# Copyright (c) 2012-2016 Krzysztof Jusiak (krzysztof at jusiak dot net)
#
# 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)
#
function(example example)
    string(REPLACE "/" "_" tmp ${example})
    add_executable(example.${tmp} ${CMAKE_CURRENT_LIST_DIR}/${example}.cpp)
    add_test(example.${tmp} example.${tmp})
endfunction()

example(annotations)
example(automatic_injection)
example(bind_non_owning_ptr)
example(bindings)
example(configuration)
example(constructor_injection)
example(constructor_signature)
example(custom_policy)
example(custom_provider)
example(custom_scope)
example(deduce_scope)
example(dynamic_bindings)
example(fwd_bindings)
example(hello_world)
example(modules)
example(motivation)
example(multiple_bindings)
example(multiple_interfaces)
example(pool_provider)
example(scopes)
example(try_it)

example(performance/create_bound_interface)
example(performance/create_bound_interface_via_exposed_module)
example(performance/create_bound_interface_via_module)
example(performance/create_named_type)
example(performance/create_type_with_bound_instance)
example(performance/create_type_without_bindings)

example(tutorial/basic_annotations_to_the_rescue)
example(tutorial/basic_create_objects_tree)
example(tutorial/basic_decide_the_life_times)
example(tutorial/basic_first_steps_with_bindings)
example(tutorial/basic_first_steps_with_bindings_override)
example(tutorial/basic_first_steps_with_dynamic_bindings)
example(tutorial/basic_first_steps_with_multiple_bindings)
example(tutorial/basic_split_your_configuration)
example(tutorial/basic_split_your_configuration_expose)

example(user_guide/annotated_constructor_injection)
example(user_guide/annotated_constructor_injection_with_constructor_definition)
example(user_guide/annotated_constructor_injection_with_ctor_traits)
example(user_guide/annotated_constructor_injection_with_the_same_names)
example(user_guide/bind_cross_platform)
example(user_guide/bind_deduce_type_to_value)
example(user_guide/bind_dynamic_bindings)
example(user_guide/bind_interface_to_implementation)
example(user_guide/bind_multiple_bindings)
example(user_guide/bind_multiple_bindings_initializer_list)
example(user_guide/bind_multiple_interfaces)
example(user_guide/bind_type_override)
example(user_guide/bind_type_to_compile_time_value)
example(user_guide/bind_type_to_value)
example(user_guide/constructor_injection_aggregate)
example(user_guide/constructor_injection_ambiguous_constructors_via_BOOST_DI_INJECT)
example(user_guide/constructor_injection_ambiguous_constructors_via_BOOST_DI_INJECT_TRAITS)
example(user_guide/constructor_injection_ambiguous_constructors_via_ctor_traits)
example(user_guide/constructor_injection_ambiguous_constructors_via_inject)
example(user_guide/constructor_injection_ambiguous_constructors_via_vaargs)
example(user_guide/constructor_injection_default_values)
example(user_guide/constructor_injection_direct)
example(user_guide/constructor_injection_long_parameter_list)
example(user_guide/constructor_injection_multiple_constructors)
example(user_guide/injector_empty)
example(user_guide/module)
example(user_guide/module_exposed_annotated_type)
example(user_guide/module_exposed_complex_types)
example(user_guide/module_exposed_many_types)
example(user_guide/module_exposed_type)
example(user_guide/policies_constructible_global)
example(user_guide/policies_constructible_local)
example(user_guide/policies_print_type_extended)
example(user_guide/policies_print_types)
example(user_guide/providers_heap)
example(user_guide/providers_heap_no_throw)
example(user_guide/providers_stack_over_heap)
example(user_guide/scopes_custom)
example(user_guide/scopes_deduce_default)
example(user_guide/scopes_instance)
example(user_guide/scopes_singleton)
example(user_guide/scopes_unique)
