@benthevining It’s my library. Planning to offer shared, static, header-only, and amalgamation-header-only variants.
(the shared/static variants are a new option, as I expect that approach to give better errors, along with the advantages of including multiple times without worrying about #define IMPL)
I mean, I could refactor the library to be header/source and then write concatenation code (which would be simpler). But I’m almost ready from the other direction route, and it would be more generalisable and thus applicable to other peoples header-only projects also.
How do I escape the line-continuation character for use in STREQUAL?
I don’t think single quoted strings are a thing in CMake; you should use double quotes everywhere.
As for the end goal…I think you want a slightly more powerful language that has a C parser as a library or something. CMake itself seems wholly unsuited for this problem. Maybe Python’s ffi module has something you can use? Perl probably has something on CPAN.