Generate header amalgamation from multiple header and source files?

351 views Asked by At

I've been using a header-only library, but it has actually separated it out into header (*.h) and source (*.c) files.

SQLite creates a single file—primarily for other reasons related to optimisation—so I was wondering if there's an automated way of generated one header amalgamation from multiple header and source files.

(I've tried manually by running SUBSTRING in my CMakeLists.txt)

The advantage is skipping a target_link_library step is in build speed, distribution, and simpler help text.

I could probably write something with LLVM's LibTooling or LibClang… but this seems like a common use case that others have solved expertly.

How do I automatically generate one amalgamated header from multiple header and source files?

0

There are 0 answers