diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2024-05-07 16:26:41 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2024-05-07 16:26:41 +0300 |
commit | 0bd6524e3258faee44acedf758ccfbcd55368fc2 (patch) | |
tree | 80b236d64bd1247a3c083eb818fadb960bb43006 /odb-examples/pimpl/buildfile | |
parent | d22e4b44f3e543d3f1587c227e101e6ee918612f (diff) |
Turn odb-examples repository into package for muti-package repositoryodb-examples
Diffstat (limited to 'odb-examples/pimpl/buildfile')
-rw-r--r-- | odb-examples/pimpl/buildfile | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/odb-examples/pimpl/buildfile b/odb-examples/pimpl/buildfile new file mode 100644 index 0000000..b6f8a88 --- /dev/null +++ b/odb-examples/pimpl/buildfile @@ -0,0 +1,44 @@ +# file : pimpl/buildfile +# license : GNU GPL v2; see accompanying LICENSE file + +import libodb = libodb%lib{odb} + +import libs = libodb-$database%lib{odb-$database} + +exe{driver}: {hxx cxx}{* -*-odb -*-odb-*} {hxx ixx cxx}{person-odb} testscript + +# The metadata library target which we use to extract the poptions variable +# value for specifying the contained options on the ODB compiler command line. +# +libue{person-meta}: $libodb + +exe{driver}: libue{person-meta} $libs + +<{hxx ixx cxx}{person-odb}>: hxx{person} libue{person-meta} $odb +{{ + pops = $cxx.lib_poptions($<[1]) + depdb hash $pops + + depdb dyndep --dyn-target --target-what 'generated schema' --format lines \ + -- echo ($sqlite ? '' : "$out_base/person.sql") + + $odb --std c++11 \ + --database $database \ + --generate-schema \ + --generate-query \ + --output-dir $out_base \ + --table-prefix pimpl_ \ + "-I$src_base" $pops \ + $path($<[0]) +}} + +cxx.poptions =+ "-I$out_base" "-I$src_base" -DDATABASE_$ucase($database) + +# Testscript's run-time prerequisites. +# +# @@ BUILD2: Eventually we should be able to mark it as test.input once +# this is supported for testscript tests. +# +exe{driver}: ../alias{database-client}: include = adhoc + +testscript@./: schema = person |