# file      : cxx/parser/duplicate/buildfile
# license   : GNU GPL v2 + exceptions; see accompanying LICENSE file

if ($build.meta_operation != 'dist')
{
  assert ($reuse_style != 'none') \
    "config.xsde_tests.reuse_style should not be set to 'none' for this test"

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

import libs = libxsde%lib{xsde}

exe{driver}: {hxx ixx cxx}{test-pskel}   \
             {hxx     cxx}{test-pimpl}   \
             {        cxx}{test-pdriver} \
             $libs

exe{driver}: xml{test-000}: test.input  = true
exe{driver}: std{test-000}: test.stdout = true

<{hxx ixx cxx}{test-pskel}                     \
 {hxx     cxx}{test-pimpl}                     \
 {        cxx}{test-pdriver}>: xsd{test} $xsde
{{
  $xsde cxx-parser $cxx_parser_options \
        --generate-print-impl          \
        --generate-test-driver         \
        --force-overwrite              \
        --output-dir $out_base         \
        $path($<[0])
}}

cxx.poptions =+ "-I$out_base"
