A C program whose build script is written in C++ and uses a helper library.
packages/tablegen- a C++librarythat computes the CRC-32 lookup table.packages/app- a Cexecutable. Its[build-dependencies]nametablegen, and its build script,build.cpp, links that library, writes the table ascrc32_table.cinto the directoryCABIN_OUT_DIRnames, and reports the file as a further source of theapptarget.
A build dependency is built for the machine the build runs on, and only the build script links it.
The app executable links no C++: it is compiled and linked as C. See
docs/build-scripts.md for what a build script is given and may
report.
cd examples/build-script-helper-lib
cabin runExpected output:
crc32("cabin") = ce4ce919