# file      : cxx/serializer/minimal/buildfile
# license   : not copyrighted - public domain

if ($build.meta_operation != 'dist')
{
  assert (!$stl) \
    "config.xsde_examples.stl should be set to false for this example"

  assert (!$iostream) \
    "config.xsde_examples.exceptions should be set to false for this example"

  assert (!$exceptions) \
    "config.xsde_examples.exceptions should be set to false for this example"

  assert ($reuse_style != 'none') \
    "config.xsde_examples.reuse_style should not be set to 'none' for this example"

  assert (!$custom_allocator || $default_allocator) \
    "config.xsde_examples.default_allocator should be set to true for this example"
}

import libs = libxsde%lib{xsde}

./: exe{driver} doc{README}

exe{driver}: {hxx     cxx}{* -people-simpl-* -people-sskel} \
             {hxx ixx cxx}{                   people-sskel}

exe{driver}: hxx{people-simpl-tiein}: include = ($reuse_style == 'tiein')
exe{driver}: hxx{people-simpl-mixin}: include = ($reuse_style == 'mixin')

exe{driver}: $libs

<{hxx ixx cxx}{people-sskel}>: xsd{people} map{people} $xsde
{{
  # For options contained in cxx_serializer_options variable see
  # build/root.build.
  #
  $xsde cxx-serializer $cxx_serializer_options \
        --type-map $path($<[1])	               \
        --output-dir $out_base                 \
        $path($<[0])
}}

cxx.poptions =+ "-I$out_base" "-I$src_base"
