- The build flags for the C part of the library overwrite the compile flags for C++, in particular, they add -std=c99 to the C++ compilation.
- The C parts get auto-mocced (!) which generates a C++ file (although it's empty), which then gets compiled with the C flags (and weird -std= setting).
- For clang, that leads to a build failure.
So switch out some things:
- Build the C parts as an OBJECT library,
- Don't apply the C flags to anything but that OBJECT library,
- and don't automoc C code.