From a8ce5c380c69539fe0c7c62c397634d9d0c9fde2 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 18 Dec 2020 18:48:46 +0300 Subject: Switch to build2 --- xsd-examples/cxx/parser/performance/buildfile | 57 +++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 xsd-examples/cxx/parser/performance/buildfile (limited to 'xsd-examples/cxx/parser/performance/buildfile') diff --git a/xsd-examples/cxx/parser/performance/buildfile b/xsd-examples/cxx/parser/performance/buildfile new file mode 100644 index 0000000..10111d6 --- /dev/null +++ b/xsd-examples/cxx/parser/performance/buildfile @@ -0,0 +1,57 @@ +# file : cxx/parser/performance/buildfile +# license : not copyrighted - public domain + +import libs = libxsd%lib{xsd} + +import libxerces = libxerces-c%lib{xerces-c} +import libexpat = libexpat%lib{expat} + +./: doc{README} + +# exe{driver-{xerces,expat}} +# +for p: 'xerces' 'expat' +{ + # Make sure that obje{time} doesn't depend on the parser library that varies + # for different exe{driver-*} targets. Think of -I... options passed to the + # compiler while compiling time.cxx, which would vary depending on exe + # target time.cxx is a prerequisite of. + # + ./: exe{driver-$p}: obje{driver-$p time} \ + {hxx ixx cxx}{test-$p-pskel} \ + $libs $(lib$p) + + exe{driver-$p}: xml{test-50k}: test.input = true + + obje{driver-$p}: cxx{driver} $libs $(lib$p) + + <{hxx ixx cxx}{test-$p-pskel}>: xsd{test} $xsd + { + # Note: we can't use $p in the buildscript since it will be substituted by + # the latest $p value. + # + parser = $p + } + {{ + diag xsd ($<[0]) # @@ TMP + + $xsd cxx-parser --std c++11 \ + --generate-inline \ + --skel-file-suffix -$parser-pskel \ + --xml-parser $parser \ + --output-dir $out_base \ + $path($<[0]) + }} +} + +obje{time}: {hxx cxx}{time} + +# exe{gen} +# +./: exe{gen}: cxx{gen} testscript{gen} + +# Build options. +# +cxx.poptions =+ "-I$out_base" "-I$src_base" + +obje{driver-xerces}: cxx.poptions += -DXERCES_PARSER -- cgit v1.1