# file      : cxx/parser/error-handling/codes/buildfile
# license   : GNU GPL v2 + exceptions; see accompanying LICENSE file

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

  assert ($iostream) \
    "config.xsde_tests.iostream should be set to true for this test"

  assert ($parser_validation) \
    "config.xsde_tests.parser_validation should be set to true 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 cxx}{* -test-pskel} {hxx ixx cxx}{test-pskel} $libs

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

<{hxx ixx cxx}{test-pskel}>: xsd{test} map{test} $xsde
{{
  $xsde cxx-parser $cxx_parser_options \
        --output-dir $out_base         \
        --type-map $path($<[1])        \
        $path($<[0])
}}

cxx.poptions =+ "-I$out_base"
